forked from turanszkij/WickedEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (37 loc) · 1.23 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
cmake_minimum_required(VERSION 3.8)
option(WICKED_DYNAMIC_LIBRARY "Build WickedEngine as a dynamic library" OFF)
option(WICKED_EDITOR "Build WickedEngine editor" ON)
option(WICKED_TESTS "Build WickedEngine tests" ON)
option(WICKED_IMGUI_EXAMPLE "Build WickedEngine imgui example" ON)
option(WICKED_LINUX_TEMPLATE "Build WickedEngine Linux template" ON)
# Configure CMake global variables
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Use solution folders to organize projects
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
project(WickedEngine)
if (WIN32)
set(PLATFORM "Windows")
add_compile_definitions(WIN32=1)
# add_compile_definitions(_WIN32=1) this is a given from the compiler
set(DXC_TARGET "${CMAKE_CURRENT_SOURCE_DIR}/WickedEngine/dxc.exe")
elseif(UNIX)
set(PLATFORM "SDL2")
add_compile_definitions(SDL2=1)
set(DXC_TARGET "dxc")
endif()
add_subdirectory(WickedEngine)
if (WICKED_EDITOR)
add_subdirectory(Editor)
endif()
if (WICKED_TESTS)
add_subdirectory(Tests)
endif()
if (WICKED_IMGUI_EXAMPLE)
add_subdirectory(Example_ImGui)
add_subdirectory(Example_ImGui_Docking)
endif()
if (WICKED_LINUX_TEMPLATE)
add_subdirectory(Template_Linux)
endif()