-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
52 lines (39 loc) · 1.52 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
cmake_minimum_required (VERSION 3.10)
project ("DreamRender")
set(CMAKE_CXX_STANDARD 17)
add_subdirectory("common")
add_subdirectory("core")
add_executable(DreamRender main.cpp)
target_include_directories(DreamRender PUBLIC
./common
./core
./external/stb/include
./external/tinyobjloader/include
./external/embree/include
./external/glad/include
./external/glfw3/include
./external/glm/include
./external/nlohmann_json/include
)
target_link_libraries(DreamRender PUBLIC
common
core
../external/glfw3/lib/glfw3dll
../external/glad/lib/glad
../external/embree/lib/embree3
../external/embree/lib/tbb
)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(TARGET_NAME DreamRender)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/shader $<TARGET_FILE_DIR:${TARGET_NAME}>/shader
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/scenes $<TARGET_FILE_DIR:${TARGET_NAME}>/scenes
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/external/embree/bin/embree3.dll $<TARGET_FILE_DIR:${TARGET_NAME}>/embree3.dll
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/external/embree/bin/tbb12.dll $<TARGET_FILE_DIR:${TARGET_NAME}>/tbb12.dll
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/bin/glfw3.dll $<TARGET_FILE_DIR:${TARGET_NAME}>/glfw3.dll
)