|
@@ -343,7 +343,12 @@ if(LIBIGL_WITH_OPENGL)
|
|
|
list(APPEND GLFW_INCLUDE_DIRS "${NANOGUI_DIR}/ext/glew/include")
|
|
|
endif()
|
|
|
|
|
|
- add_subdirectory("${NANOGUI_DIR}/ext/glfw" "glfw")
|
|
|
+ # Note: if add_subdirectory("${NANOGUI_DIR}" "nanogui") runs below it will
|
|
|
+ # add GLFW as a side-effect; in this case, CMake will complain about
|
|
|
+ # duplicates if we add them here.
|
|
|
+ if (NOT (LIBIGL_WITH_VIEWER AND LIBIGL_WITH_NANOGUI))
|
|
|
+ add_subdirectory("${NANOGUI_DIR}/ext/glfw" "glfw")
|
|
|
+ endif()
|
|
|
set(LIBIGL_OPENGL_GLFW_EXTRA_LIBRARIES "glfw" ${GLFW_LIBRARIES})
|
|
|
if(LIBIGL_USE_STATIC_LIBRARY)
|
|
|
CompileIGL_Module("opengl/glfw" "")
|