-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
23 lines (16 loc) · 1015 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
cmake_minimum_required (VERSION 3.16)
project (Path-Tracer)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -std=c++17")
set (source_dir "${PROJECT_SOURCE_DIR}/src/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
FIND_LIBRARY(FreeImage_LIBRARY NAMES FreeImage HINTS ${PROJECT_SOURCE_DIR}/src/dependancies)
#FIND_LIBRARY(OpenImageDenoise NAMES OpenImageDenoise HINTS ${PROJECT_SOURCE_DIR}/src/dependancies)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
file (GLOB source_files "${source_dir}/*.cpp" "${source_dir}/dependancies/*.cpp" "${source_dir}/dependancies/*/*.cpp" "${source_dir}/core/*.cpp" "${source_dir}/optim/*.cpp" "${source_dir}/utils/*.cpp" "${source_dir}/shaders/*.cpp")
add_executable (path-tracer ${source_files})
target_link_libraries(path-tracer freeimage)