forked from phisko/kengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (43 loc) · 1.09 KB
/
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
cmake_minimum_required(VERSION 3.0)
project(kengine)
set(CMAKE_CXX_STANDARD 17)
if(KENGINE_SFML)
set(PUTILS_BUILD_PSE TRUE)
endif()
if(KENGINE_OGRE)
set(PUTILS_BUILD_POGRE TRUE)
endif()
if(KENGINE_TEST)
set(PUTILS_TEST TRUE)
endif()
add_subdirectory(putils)
file(GLOB src_files
*.cpp
*.hpp
)
if(UNIX)
set(type SHARED)
elseif(WIN32)
set(type STATIC)
endif()
add_library(kengine INTERFACE)
target_link_libraries(kengine INTERFACE mediator pluginManager)
target_include_directories(kengine INTERFACE .)
if(KENGINE_SFML)
add_subdirectory(common/systems/sfml)
endif()
if(KENGINE_OGRE)
add_subdirectory(common/systems/ogre)
endif()
# Test
if(KENGINE_TEST)
set(test_name kengine_test)
file(GLOB testSrc
test/*.cpp test/*.hpp
test/*/*.cpp test/*/*.hpp
putils/test/*.cpp putils/test/*.hpp
putils/test/*/*.cpp putils/test/*/*.hpp
)
add_executable(${test_name} ${testSrc})
target_link_libraries(${test_name} kengine gtest_main)
endif()