-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
146 lines (135 loc) · 3.46 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
cmake_minimum_required (VERSION 2.8.10)
project(nori)
add_subdirectory(ext ext_build)
include_directories(
# Nori include files
${CMAKE_CURRENT_SOURCE_DIR}/include
# tinyformat string formatting library
${TFM_INCLUDE_DIR}
# Eigen linear algebra library
${EIGEN_INCLUDE_DIR}
# OpenEXR high dynamic range bitmap library
${OPENEXR_INCLUDE_DIRS}
# Intel Thread Building Blocks
${TBB_INCLUDE_DIR}
# Pseudorandom number generator
${PCG32_INCLUDE_DIR}
# PugiXML parser
${PUGIXML_INCLUDE_DIR}
# Helper functions for statistical hypothesis tests
${HYPOTHESIS_INCLUDE_DIR}
# GLFW library for OpenGL context creation
${GLFW_INCLUDE_DIR}
# GLEW library for accessing OpenGL functions
${GLEW_INCLUDE_DIR}
# NanoVG drawing library
${NANOVG_INCLUDE_DIR}
# NanoGUI user interface library
${NANOGUI_INCLUDE_DIR}
${NANOGUI_EXTRA_INCS}
# Portable filesystem API
${FILESYSTEM_INCLUDE_DIR}
# STB Image Write
${STB_IMAGE_WRITE_INCLUDE_DIR}
)
# The following lines build the main executable. If you add a source
# code file to Nori, be sure to include it in this list.
add_executable(nori
# Header files
include/nori/bbox.h
include/nori/bitmap.h
include/nori/block.h
include/nori/bsdf.h
include/nori/accel.h
include/nori/camera.h
include/nori/color.h
include/nori/common.h
include/nori/dpdf.h
include/nori/frame.h
include/nori/integrator.h
include/nori/emitter.h
include/nori/mesh.h
include/nori/object.h
include/nori/parser.h
include/nori/proplist.h
include/nori/ray.h
include/nori/rfilter.h
include/nori/sampler.h
include/nori/scene.h
include/nori/timer.h
include/nori/transform.h
include/nori/vector.h
include/nori/warp.h
include/nori/octree.h
include/nori/envmap.h
include/nori/texture.h
include/nori/medium.h
include/nori/phase.h
# Source code files
src/bitmap.cpp
src/block.cpp
src/accel.cpp
src/chi2test.cpp
src/common.cpp
src/diffuse.cpp
src/gui.cpp
src/independent.cpp
src/main.cpp
src/mesh.cpp
src/obj.cpp
src/object.cpp
src/parser.cpp
src/perspective.cpp
src/proplist.cpp
src/rfilter.cpp
src/scene.cpp
src/ttest.cpp
src/warp.cpp
src/microfacet.cpp
src/mirror.cpp
src/dielectric.cpp
src/normals.cpp
src/octree.cpp
src/simple.cpp
src/ao.cpp
src/area.cpp
src/whitted.cpp
src/path_mats.cpp
src/path_ems.cpp
src/path_mis.cpp
src/point.cpp
src/infinite.cpp
src/envmap.cpp
src/texture.cpp
src/homogeneous.cpp
src/heterogeneous.cpp
src/isotropic.cpp
src/path_vol.cpp
src/disney.cpp
src/path_spectral.cpp
src/dielectric_spectral.cpp
)
add_definitions(${NANOGUI_EXTRA_DEFS})
# The following lines build the warping test application
add_executable(warptest
include/nori/warp.h
src/warp.cpp
src/warptest.cpp
src/microfacet.cpp
src/object.cpp
src/proplist.cpp
src/common.cpp
)
target_link_libraries(nori tbb_static pugixml IlmImf nanogui ${NANOGUI_EXTRA_LIBS})
target_link_libraries(warptest tbb_static nanogui ${NANOGUI_EXTRA_LIBS})
# Force colored output for the ninja generator
if (CMAKE_GENERATOR STREQUAL "Ninja")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()
endif()
# vim: set et ts=2 sw=2 ft=cmake nospell: