-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (23 loc) · 968 Bytes
/
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
cmake_minimum_required(VERSION 3.0.0)
project(BasicRayTracing VERSION 0.0.1)
# Dependencies
include(ExternalProject)
find_package (Threads REQUIRED)
ExternalProject_Add(stb
BUILD_COMMAND ""
INSTALL_COMMAND ""
CONFIGURE_COMMAND ""
UPDATE_COMMAND ""
PREFIX ${CMAKE_BINARY_DIR}/thirdparty/stb
GIT_REPOSITORY "https://github.com/nothings/stb.git"
GIT_TAG "master")
# File globs and copies
file(GLOB_RECURSE SRC_FILES ./src/*.cpp)
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
# Main executable and dependencies
add_executable(BasicRayTracing ${SRC_FILES})
add_dependencies(BasicRayTracing stb)
target_include_directories(BasicRayTracing PRIVATE
include
${CMAKE_BINARY_DIR}/thirdparty/stb/src/stb)
target_link_libraries(BasicRayTracing ${CMAKE_THREAD_LIBS_INIT})