-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (49 loc) · 872 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required(VERSION 3.23)
project(matrix-screen)
add_subdirectory(
lib/sdlpp
)
add_library(
${PROJECT_NAME}
INTERFACE
)
if(EMSCRIPTEN)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -sUSE_SDL_TTF=2"
)
else()
target_link_libraries(
${PROJECT_NAME}
INTERFACE
SDL2_ttf
)
endif()
list(APPEND
CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/lib/sdlpp/cmake/sdl2)
target_include_directories(
${PROJECT_NAME}
INTERFACE
include
)
target_link_libraries(
${PROJECT_NAME}
INTERFACE
sdlpp
)
target_compile_features(
${PROJECT_NAME}
INTERFACE
cxx_std_17
)
# Demo application
add_executable(
${PROJECT_NAME}-demo
demo/main.cpp
)
target_link_libraries(
${PROJECT_NAME}-demo
PRIVATE
${PROJECT_NAME}
)