Selaa lähdekoodia

External VTK7

submodule
Trevor Irons 6 vuotta sitten
vanhempi
commit
bf935e5afc
2 muutettua tiedostoa jossa 33 lisäystä ja 3 poistoa
  1. 30
    2
      CMakeLists.txt
  2. 3
    1
      Modules/LemmaCore/CMakeLists.txt

+ 30
- 2
CMakeLists.txt Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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()

Loading…
Peruuta
Tallenna