Parcourir la source

External VTK7

submodule
Trevor Irons il y a 6 ans
Parent
révision
bf935e5afc
2 fichiers modifiés avec 33 ajouts et 3 suppressions
  1. 30
    2
      CMakeLists.txt
  2. 3
    1
      Modules/LemmaCore/CMakeLists.txt

+ 30
- 2
CMakeLists.txt Voir le fichier

@@ -81,9 +81,7 @@ else()
81 81
         	       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} /
82 82
     	           -DYAML_CPP_BUILD_TESTS=OFF 
83 83
 	)	
84
-	#find_package(yaml-cpp REQUIRED)
85 84
 endif()
86
-
87 85
 #add_compile_options(-DHAVE_YAMLCPP) 
88 86
 
89 87
 # CxxTest 
@@ -166,6 +164,36 @@ if ( LEMMA_VTK7_SUPPORT )
166 164
 			vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkInteractionStyle 
167 165
 			vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
168 166
 	set(volumeRenderer volumerenderer.cxx)
167
+
168
+	if (VTK_FOUND)
169
+		message(STATUS "VTK 7 was found! ") 
170
+	else()
171
+		ExternalProject_Add(VTK
172
+  		GIT_REPOSITORY "${git_protocol}://vtk.org/VTK.git"
173
+  		GIT_TAG "${VTK_TAG}"
174
+  		SOURCE_DIR VTK
175
+  		BINARY_DIR VTK-build
176
+  		CMAKE_GENERATOR ${gen}
177
+  		CMAKE_ARGS
178
+	    -DBUILD_SHARED_LIBS:BOOL=ON
179
+	    -DBUILD_EXAMPLES:BOOL=OFF
180
+	    -DBUILD_TESTING:BOOL=OFF
181
+	    -DVTK_Group_Web:BOOL=ON
182
+	    -DModule_vtkImagingMath:BOOL=ON
183
+	    -DVTK_WRAP_PYTHON:BOOL=ON
184
+	    -DExternalData_OBJECT_STORES:STRING=${ExternalData_OBJECT_STORES}
185
+	    "-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}"
186
+	    -DVTK_USE_SYSTEM_ZLIB:BOOL=ON
187
+	    "-DZLIB_ROOT:PATH=${ZLIB_ROOT}"
188
+	    "-DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}"
189
+	    "-DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY}"
190
+	  	INSTALL_COMMAND ""
191
+	  	LOG_DOWNLOAD 0
192
+	  	LOG_UPDATE 0
193
+	  	DEPENDS zlib
194
+		)
195
+	endif()
196
+
169 197
 	include(${VTK_USE_FILE}) 
170 198
 	add_compile_options(-DLEMMAUSEVTK) 
171 199
 	# Compile Matplot_vtk if VTK is present

+ 3
- 1
Modules/LemmaCore/CMakeLists.txt Voir le fichier

@@ -26,8 +26,10 @@ if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT )
26 26
 #	target_link_libraries(lemmacore "matplot")
27 27
 endif()
28 28
 
29
+# find_package(yaml-cpp) does not seem to properly define library names...
30
+# a better solution than this is welcome 
29 31
 if (WIN32)
30
-	target_link_libraries(lemmacore "yaml-cppmdd") 
32
+	target_link_libraries(lemmacore "libyaml-cppmdd") 
31 33
 else()
32 34
 	target_link_libraries(lemmacore "yaml-cpp") 
33 35
 endif()

Chargement…
Annuler
Enregistrer