-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
78 lines (67 loc) · 1.82 KB
/
CMakeLists.txt
File metadata and controls
78 lines (67 loc) · 1.82 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
cmake_minimum_required(VERSION 3.16...3.19)
#if(MSVC)
# add_compile_options(/w)
#else()
# add_compile_options(-w)
#endif()
project(SiegeEngine VERSION 1.0 LANGUAGES CXX C)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(MSVC)
add_compile_options(/std:c++17)
#add_link_options(/PROFILE)
else()
set(OpenGL_GL_PREFERENCE GLVND)
endif()
# Add a variable specifying that unity build should be enabled for targets
set(ENABLE_UNITY_BUILD false)
# Add a variable specifying that the Vulkan graphics API should be built into the graphics library
set(ENABLE_VULKAN_GRAPHICS true)
if(ENABLE_VULKAN_GRAPHICS)
add_definitions(-DENABLE_VULKAN_GRAPHICS)
endif()
# Add preprocessor definitions
if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL MSYS)
add_definitions(-DSYSTEM_WINDOWS)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
add_definitions(-DSYSTEM_LINUX)
endif()
# Build external dependencies
include(BuildDependencies)
SE_BUILD_GLEW()
SE_BUILD_FREETYPE()
SE_BUILD_LIBUV()
SE_BUILD_USOCKETS()
SE_BUILD_GLFW()
SE_BUILD_STB()
SE_BUILD_ASSIMP()
SE_BUILD_PORT_AUDIO()
SE_BUILD_GOOGLETEST()
# Enable debug mode when building internal binaries
add_compile_definitions(DEBUG_BUILD=1)
# Build internal libraries
SE_BUILD_SE_ID()
SE_BUILD_SE_LOGGING()
SE_BUILD_SE_TIME()
SE_BUILD_SE_NET()
SE_BUILD_SE_MEMORY()
SE_BUILD_SE_PTL()
SE_BUILD_SE_MATH()
SE_BUILD_SE_FILESYSTEM()
SE_BUILD_SE_WINDOWING()
SE_BUILD_SE_GRAPHICS()
SE_BUILD_SE_AUDIO()
SE_BUILD_SE_ANIMATION()
SE_BUILD_SE_INPUT()
SE_BUILD_SE_ASSETS()
SE_BUILD_SE_PICKING()
SE_BUILD_SE_GUI()
SE_BUILD_SE_APP()
SE_BUILD_SE_GRAPHICAL_APP()
SE_BUILD_SE_TERRAIN()
SE_BUILD_SE_SERVER()
SE_BUILD_SE_CLIENT()
# Build internal apps
enable_testing()
add_subdirectory(tests/SE_TestAll)
add_subdirectory(tests/SE_AssetManagerProfiler)
add_subdirectory(tests/SE_TestScene)