-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (27 loc) · 879 Bytes
/
CMakeLists.txt
File metadata and controls
36 lines (27 loc) · 879 Bytes
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
cmake_minimum_required(VERSION 3.19)
project(Engine)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(lib/myxmlpp)
set_target_properties(myxmlpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
file(GLOB_RECURSE SRC src/*.cpp)
file(GLOB_RECURSE ICL include/*.hpp)
file(GLOB_RECURSE ICL_HEADERS include/polymorph/*.hpp)
add_library(PolymorphEngine
${SRC}
${ICL}
${ICL_HEADERS}
)
target_include_directories(PolymorphEngine PUBLIC
lib/myxmlpp/include
include
)
target_link_libraries(PolymorphEngine myxmlpp)
if (UNIX)
target_link_libraries(PolymorphEngine dl)
target_link_options(PolymorphEngine PUBLIC "-Wl,--no-undefined")
endif()
set_target_properties(PolymorphEngine PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_executable(TestMain EXCLUDE_FROM_ALL
SampleProject/test_main.cpp
)
target_link_libraries(TestMain PolymorphEngine)