This repository has been archived by the owner on Dec 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
99 lines (85 loc) · 3.29 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
cmake_minimum_required(VERSION 3.13)
project(myrt
VERSION 1.0
LANGUAGES CXX)
IF(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
ENDIF(MSVC)
# GLShader
set(EXT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext)
function(add_external path repo)
if(NOT EXISTS ${path})
execute_process(COMMAND ${GIT_EXECUTABLE} clone ${repo} ${path})
endif()
add_subdirectory(${path})
endfunction()
add_external(${EXT_DIR}/glsp "https://github.com/johannes-braun/GLshader.git")
add_external(${EXT_DIR}/rnu "https://github.com/johannes-braun/rnu.git")
find_package(Git REQUIRED)
find_package(SFML 2 COMPONENTS graphics audio main network system window REQUIRED)
find_package(OpenCL REQUIRED)
find_package(Stb REQUIRED)
find_package(imgui CONFIG REQUIRED)
find_package(ImGui-SFML CONFIG REQUIRED)
find_package(nlohmann_json REQUIRED)
add_subdirectory(src)
add_executable(myrt
#"src/myrt.cpp"
"src/pathtracer/bvh.hpp"
"src/pathtracer/bvh.cpp"
"src/pathtracer/texture_provider.hpp"
"src/pathtracer/texture_provider.cpp"
"src/pathtracer/pathtracer.hpp"
"src/pathtracer/pathtracer.cpp"
"src/pathtracer/scene.hpp"
"src/pathtracer/scene.cpp"
"src/obj.hpp"
"src/obj.cpp"
"src/glsl/color.h"
"src/glsl/tonemapping.h"
"src/vectoring/vectoring.hpp"
"src/vectoring/distance.hpp"
"src/stb.cpp"
"src/main.cpp"
"src/myrt.sfml/include/myrt/sfml/sfml.hpp"
"src/resources.hpp"
"src/pathtracer/sdf.hpp"
"src/thread_pool.hpp"
"src/thread_pool.cpp"
"src/pathtracer/sequential_pathtracer.hpp"
"src/pathtracer/sequential_pathtracer.cpp"
"src/pathtracer/parameter.hpp"
"src/pathtracer/parameter.cpp"
"src/pathtracer/parameterized.hpp"
"src/pathtracer/parameterized.cpp"
"src/dynamic/object.hpp"
"src/dynamic/property.hpp"
"src/dynamic/object.cpp"
"src/dynamic/property.cpp"
#"src/dynamic/material.hpp"
#"src/dynamic/material.cpp"
"src/pathtracer/material.hpp"
"src/pathtracer/material.cpp"
"src/mygl/include/mygl/mygl.hpp"
"src/mygl/include/mygl/mygl_enums.hpp"
"src/mygl/include/mygl/mygl_extensions.hpp"
"src/mygl/include/mygl/mygl_functions.hpp"
"src/mygl/include/mygl/mygl_loader.hpp"
"src/mygl/include/mygl/mygl_types.hpp"
"src/mygl/mygl.cpp"
"src/pathtracer/post_process.hpp"
"src/pathtracer/post_process.cpp"
"src/pathtracer/bindings.hpp"
"src/pathtracer/bindings.cpp"
"src/pathtracer/forward_renderer.hpp"
"src/pathtracer/forward_renderer.cpp" "src/pathtracer/sdf.cpp"
"src/ecs/ecs.cpp"
"src/ecs/system.cpp" "src/material.hpp" "src/types.hpp" "src/pathtracer/texture_array.hpp" "src/pathtracer/texture_array.cpp" "src/cl.hpp" "src/gl_current.hpp" "src/gl_current.cpp")
target_compile_features(myrt PUBLIC cxx_std_23)
target_link_libraries(myrt PUBLIC myrt.sfml myrt.xgl)
target_link_libraries(myrt PRIVATE OpenCL::OpenCL)
target_link_libraries(myrt PUBLIC Freetype OpenAL OpenGL Vorbis sfml-audio sfml-graphics sfml-main sfml-network sfml-system sfml-window)
target_include_directories(myrt PUBLIC ${Stb_INCLUDE_DIR})
target_link_libraries(myrt PRIVATE ImGui-SFML::ImGui-SFML nlohmann_json nlohmann_json::nlohmann_json)
target_link_libraries(myrt PRIVATE glsp::glsp)
target_link_libraries(myrt PRIVATE rnu::rnu)