Mercurial > minori
comparison dep/animia/CMakeLists.txt @ 155:d2bbb5773616
dep/animia: add quartz backend for windows
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Wed, 15 Nov 2023 15:24:39 -0500 |
| parents | d43d68408d3c |
| children | cdf79282d647 |
comparison
equal
deleted
inserted
replaced
| 154:d43d68408d3c | 155:d2bbb5773616 |
|---|---|
| 1 cmake_minimum_required(VERSION 3.9) | 1 cmake_minimum_required(VERSION 3.9) |
| 2 project(animia) | 2 project(animia LANGUAGES CXX) |
| 3 set(SRC_FILES | 3 set(SRC_FILES |
| 4 # any non-platform-specific files go here | 4 # any non-platform-specific files go here |
| 5 src/animia.cc | 5 src/animia.cc |
| 6 src/player.cc | 6 src/player.cc |
| 7 src/util.cc | 7 src/util.cc |
| 8 src/strategist.cc | 8 src/strategist.cc |
| 9 src/fd.cc | 9 src/fd.cc |
| 10 src/win.cc | 10 src/win.cc |
| 11 ) | 11 ) |
| 12 | |
| 13 set(LIBRARIES) | |
| 12 | 14 |
| 13 # FD | 15 # FD |
| 14 if(LINUX) | 16 if(LINUX) |
| 15 list(APPEND SRC_FILES | 17 list(APPEND SRC_FILES |
| 16 # linux | 18 # linux |
| 32 if(WIN32) | 34 if(WIN32) |
| 33 list(APPEND SRC_FILES | 35 list(APPEND SRC_FILES |
| 34 src/win/win32.cc | 36 src/win/win32.cc |
| 35 src/util/win32.cc | 37 src/util/win32.cc |
| 36 ) | 38 ) |
| 37 else() | 39 elseif(APPLE) |
| 38 # soon x11 and apple stuff will be here... | 40 enable_language(OBJCXX) |
| 41 list(APPEND SRC_FILES | |
| 42 src/win/quartz.mm | |
| 43 ) | |
| 44 find_library(FOUNDATION_LIBRARY Foundation) | |
| 45 find_library(COREGRAPHICS_LIBRARY CoreGraphics) | |
| 46 find_library(APPKIT_LIBRARY AppKit) | |
| 47 list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${COREGRAPHICS_LIBRARY} ${APPKIT_LIBRARY}) | |
| 39 endif() | 48 endif() |
| 40 | 49 |
| 41 add_library(animia SHARED ${SRC_FILES}) | 50 add_library(animia SHARED ${SRC_FILES}) |
| 42 set_target_properties(animia PROPERTIES | 51 set_target_properties(animia PROPERTIES |
| 43 PUBLIC_HEADER include/animia.h | 52 PUBLIC_HEADER include/animia.h |
| 54 endif() | 63 endif() |
| 55 target_compile_definitions(animia PUBLIC UNIX) | 64 target_compile_definitions(animia PUBLIC UNIX) |
| 56 endif() | 65 endif() |
| 57 | 66 |
| 58 target_include_directories(animia PRIVATE include) | 67 target_include_directories(animia PRIVATE include) |
| 68 target_link_libraries(animia PUBLIC ${LIBRARIES}) |
