Browse Source

static build disabled for visual studio

Former-commit-id: 04f4c7eef56519cf6b1bca468fd0542d42c6ce05
Daniele Panozzo 9 years ago
parent
commit
fb92c64f82
1 changed files with 11 additions and 2 deletions
  1. 11 2
      tutorial/CMakeLists.txt

+ 11 - 2
tutorial/CMakeLists.txt

@@ -50,8 +50,17 @@ list(APPEND SHARED_LIBRARIES "nanogui" "glfw")
 #Compile embree
 option(ENABLE_ISPC_SUPPORT " " OFF)
 option(RTCORE_TASKING_SYSTEM " " INTERNAL)
-option(ENABLE_STATIC_LIB " " ON)
-set(ENABLE_STATIC_LIB ON CACHE BOOL "force static build of embree" FORCE)
+
+IF(NOT MSVC) # embree static build is broken on visual studio
+	option(ENABLE_STATIC_LIB " " ON)
+	set(ENABLE_STATIC_LIB ON CACHE BOOL "force static build of embree" FORCE)
+ENDIF(NOT MSVC)
+
+IF(MSVC)
+	option(USE_STATIC_RUNTIME " " OFF)
+	set(USE_STATIC_RUNTIME OFF CACHE BOOL "disable changes in the runtime for VS" FORCE)
+ENDIF(MSVC)
+
 option(ENABLE_TUTORIALS " " OFF)
 
 add_subdirectory("../external/embree/" "embree")