Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
109 lines (85 loc) · 3.49 KB
/
Copy pathCMakeLists.txt
File metadata and controls
109 lines (85 loc) · 3.49 KB
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
100
101
102
103
104
105
106
107
108
109
cmake_minimum_required(VERSION 3.10...4.0)
project(polymer)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_compile_options("$<$<CONFIG:DEBUG>:-DDEBUG>")
set(THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
# Dependencies
if (NOT TARGET tinygizmo)
add_subdirectory(${THIRD_PARTY_DIR}/tinygizmo tinygizmo)
endif()
if (NOT TARGET tinyexr)
add_subdirectory(${THIRD_PARTY_DIR}/tinyexr tinyexr)
endif()
if (NOT TARGET nanovg)
add_subdirectory(${THIRD_PARTY_DIR}/nanovg nanovg)
endif()
if (NOT TARGET glad)
add_subdirectory(${THIRD_PARTY_DIR}/glad glad)
endif()
if (NOT TARGET imgui)
add_subdirectory(${THIRD_PARTY_DIR}/imgui imgui)
endif()
if (NOT TARGET glfw)
set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "Build the GLFW example programs")
set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "Build the GLFW test programs")
set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "Build the GLFW documentation")
set(GLFW_INSTALL OFF CACHE INTERNAL "Generate installation target")
add_subdirectory(${THIRD_PARTY_DIR}/glfw glfw)
endif()
if (NOT TARGET spdlog)
add_subdirectory(${THIRD_PARTY_DIR}/spdlog spdlog)
endif()
if (NOT TARGET kissfft)
set(KISSFFT_TEST OFF CACHE INTERNAL "Build kissfft tests")
set(KISSFFT_TOOLS OFF CACHE INTERNAL "Build kissfft tools")
set(KISSFFT_STATIC ON CACHE INTERNAL "Build kissfft as static library")
add_subdirectory(${THIRD_PARTY_DIR}/kissfft kissfft)
endif()
# Libraries
if (NOT TARGET polymer-engine)
add_subdirectory(libraries/lib-engine polymer-engine)
endif()
if (NOT TARGET polymer-core)
add_subdirectory(libraries/lib-polymer polymer-core)
endif()
if (NOT TARGET polymer-model-io)
add_subdirectory(libraries/lib-model-io polymer-model-io)
endif()
if (NOT TARGET polymer-gfx-gl)
add_subdirectory(libraries/lib-gfx-gl polymer-gfx-gl)
endif()
if (NOT TARGET polymer-app-base)
add_subdirectory(libraries/lib-app-base polymer-app-base)
endif()
option(POLYMER_ENGINE_APPS "Build the Polymer Editor applications" ON)
if(POLYMER_ENGINE_APPS)
add_subdirectory(apps/editor polymer-scene-editor)
add_subdirectory(apps/3dgs-viewer 3dgs-viewer)
add_subdirectory(apps/2dpt 2d-pathtracer)
add_subdirectory(apps/radiance-cascades radiance-cascades)
endif()
option(POLYMER_BUILD_SAMPLES "Build the Polymer sample applications" ON)
if(POLYMER_BUILD_SAMPLES)
add_subdirectory(samples/engine-performance engine-performance)
add_subdirectory(samples/engine-procedural-material engine-procedural-material)
add_subdirectory(samples/engine-procedural-scene engine-procedural-scene)
add_subdirectory(samples/gl-bvh gl-bvh)
add_subdirectory(samples/gl-camera-trajectory gl-camera-trajectory)
add_subdirectory(samples/gl-colormap gl-colormap)
add_subdirectory(samples/gl-debug-ui gl-debug-ui)
add_subdirectory(samples/gl-galaxy gl-galaxy)
add_subdirectory(samples/gl-coulomb-gas gl-coulomb-gas)
add_subdirectory(samples/gl-meshline gl-meshline)
add_subdirectory(samples/gl-obb gl-obb)
add_subdirectory(samples/gl-octree-culling gl-octree-culling)
add_subdirectory(samples/gl-particles-hull gl-particles-hull)
add_subdirectory(samples/gl-render gl-render)
add_subdirectory(samples/gl-render-texture gl-render-texture)
add_subdirectory(samples/gl-spline-2d gl-spline-2d)
add_subdirectory(samples/waterfall-fft waterfall-fft)
endif()