|
@@ -3,8 +3,11 @@ project(libigl_tutorials)
|
|
|
|
|
|
message("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
|
|
|
|
|
|
-SET(LIBIGL_USE_STATIC_LIBRARY 1)
|
|
|
-add_definitions(-DIGL_STATIC_LIBRARY)
|
|
|
+option(LIBIGL_USE_STATIC_LIBRARY "Use static library" OFF)
|
|
|
+
|
|
|
+if(LIBIGL_USE_STATIC_LIBRARY)
|
|
|
+ add_definitions(-DIGL_STATIC_LIBRARY)
|
|
|
+endif(LIBIGL_USE_STATIC_LIBRARY)
|
|
|
|
|
|
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
|
|
|
@@ -31,10 +34,11 @@ message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
|
|
|
include("CMakeLists.shared")
|
|
|
|
|
|
#Compile libigl
|
|
|
-add_definitions(-DIGL_STATIC_LIBRARY)
|
|
|
add_definitions(-DIGL_NO_OPENGL)
|
|
|
|
|
|
-add_subdirectory("../optional" "libigl")
|
|
|
+if(LIBIGL_USE_STATIC_LIBRARY)
|
|
|
+ add_subdirectory("../optional" "libigl")
|
|
|
+endif(LIBIGL_USE_STATIC_LIBRARY)
|
|
|
include_directories("../include")
|
|
|
|
|
|
#Compile nanogui
|