Skip to content

Commit 7ec82c7

Browse files
committed
Added Embree option
1 parent 58dfd76 commit 7ec82c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if (PROJECT_IS_TOP_LEVEL)
1717
option(USE_SUITESPARSE "Use suite sparse methods for matrix inversion" ON)
1818
option(USE_PYBIND "Generate pybindings" ON)
1919
option(BUILD_CURVATURE_METRIC_TESTS "Build tests" ON)
20+
add_option(USE_EMBREE "Use Embree for rendering" OFF)
2021

2122
# Set libigl and suitesparse options
2223
option(LIBIGL_PREDICATES "Use Predicates" ON)
@@ -40,7 +41,6 @@ if(USE_MULTIPRECISION)
4041
endif()
4142

4243
# Set compile definitions
43-
add_compile_definitions(USE_EMBREE)
4444
add_compile_definitions(_USE_MATH_DEFINES)
4545
if(USE_MULTIPRECISION)
4646
add_compile_definitions(MULTIPRECISION)
@@ -52,9 +52,12 @@ if (RENDER_TEXTURE)
5252
option(LIBIGL_OPENGL "Use OpenGL" ON)
5353
option(LIBIGL_GLFW "Use GLFW" ON)
5454
option(LIBIGL_PNG "Use PNG" ON)
55-
option(LIBIGL_EMBREE "Use EMBREE" ON)
5655
add_compile_definitions(RENDER_TEXTURE)
5756
endif()
57+
if (USE_EMBREE)
58+
add_compile_definitions(USE_EMBREE)
59+
option(LIBIGL_EMBREE "Use EMBREE" ON)
60+
endif()
5861
if(USE_PYBIND)
5962
add_compile_definitions(PYBIND)
6063
endif()

0 commit comments

Comments
 (0)