-
Notifications
You must be signed in to change notification settings - Fork 39
/
CMakeLists.txt
44 lines (32 loc) · 1.11 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
cmake_minimum_required(VERSION 3.23)
project(chameleonrt)
if (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
endif()
add_definitions(-DNOMINMAX
-DGLM_ENABLE_EXPERIMENTAL
-DWIN32_LEAN_AND_MEAN
-DSDL_MAIN_HANDLED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
# Output all render plugins to the root binary dir where the executable is
# so setting runtime paths is easier
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
find_package(Threads REQUIRED)
find_package(SDL2 CONFIG REQUIRED)
# Include glm as an external project
include(cmake/glm.cmake)
include(cmake/package.cmake)
include(CMakeDependentOption)
add_subdirectory(imgui)
add_subdirectory(util)
add_subdirectory(backends)
option(REPORT_RAY_STATS "Track and report rays/second. May incur a slight rendering performance penalty" OFF)
add_executable(chameleonrt main.cpp)
set_target_properties(chameleonrt PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON)
target_link_libraries(chameleonrt PUBLIC
util
display)
install(TARGETS chameleonrt
RUNTIME DESTINATION bin)