comparison dep/animia/CMakeLists.txt @ 137:69db40272acd

dep/animia: [WIP] huge refactor this WILL NOT compile, because lots of code has been changed and every API in the original codebase has been removed. note that this api setup is not exactly permanent...
author Paper <mrpapersonic@gmail.com>
date Fri, 10 Nov 2023 13:52:47 -0500
parents eab9e623eb84
children 28842a8d0c6b
comparison
equal deleted inserted replaced
136:7d3ad9529c4c 137:69db40272acd
1 cmake_minimum_required(VERSION 3.9) 1 cmake_minimum_required(VERSION 3.9)
2 project(animia) 2 project(animia)
3 set(SRC_FILES 3 set(SRC_FILES
4 src/main.cpp 4 # any non-platform-specific files go here
5 src/animia.cc
6 src/matroska.cc
7 src/player.cc
8 src/util.cc
5 ) 9 )
6 if(LINUX) 10 if(LINUX)
7 list(APPEND SRC_FILES src/linux.cpp) 11 list(APPEND SRC_FILES
12 # linux
13 src/linux/fd.cc
14 )
8 elseif(UNIX) # this won't run on Linux 15 elseif(UNIX) # this won't run on Linux
9 list(APPEND SRC_FILES src/bsd.cpp) 16 list(APPEND SRC_FILES
17 # bsd
18 src/bsd/fd.cc
19 )
10 elseif(WIN32) 20 elseif(WIN32)
11 list(APPEND SRC_FILES src/win32.cpp) 21 list(APPEND SRC_FILES
22 # win32
23 src/platform/win32.cc
24 src/platform/win32/fd.cc
25 src/platform/win32/ui_auto.cc
26 src/platform/win32/util.cc
27 src/platform/win32/win.cc
28 )
12 endif() 29 endif()
13 add_library(animia SHARED ${SRC_FILES}) 30 add_library(animia SHARED ${SRC_FILES})
14 set_target_properties(animia PROPERTIES 31 set_target_properties(animia PROPERTIES
15 PUBLIC_HEADER animia/animia.h CXX_STANDARD 11) 32 PUBLIC_HEADER include/animia.h
33 CXX_STANDARD 17
34 )
16 target_include_directories(animia PRIVATE include) 35 target_include_directories(animia PRIVATE include)
17 option(BUILD_TESTS "Build tests" OFF)
18
19 if(BUILD_TESTS)
20 project(test LANGUAGES CXX)
21 add_executable(test test/main.cpp)
22
23 target_include_directories(test PUBLIC include)
24 target_link_libraries(test PUBLIC animia)
25 set_target_properties(test PROPERTIES CXX_STANDARD 17)
26 endif()