Browse Source

working on VTK as external project on Windows

submodule
John Daily 6 years ago
parent
commit
c3448c4c7e
1 changed files with 10 additions and 20 deletions
  1. 10
    20
      CMakeLists.txt

+ 10
- 20
CMakeLists.txt View File

111
 endif()
111
 endif()
112
 
112
 
113
 # tinyxml2, this library is used for XML IO 
113
 # tinyxml2, this library is used for XML IO 
114
-option( LEMMA_TINYXML_SUPPORT  "MATIO library support for MATLAB .mat files" OFF)
114
+option( LEMMA_TINYXML_SUPPORT  "TinyXML library support for .xml files" OFF)
115
 if ( LEMMA_TINYXML_SUPPORT )
115
 if ( LEMMA_TINYXML_SUPPORT )
116
 	ExternalProject_Add(TINYXML2
116
 	ExternalProject_Add(TINYXML2
117
 		GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
117
 		GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
167
 
167
 
168
 	if (VTK_FOUND)
168
 	if (VTK_FOUND)
169
 		message(STATUS "VTK 7 was found! ") 
169
 		message(STATUS "VTK 7 was found! ") 
170
+	        include(${VTK_USE_FILE}) 
170
 	else()
171
 	else()
171
 		ExternalProject_Add(VTK
172
 		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}
173
+  		GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"
174
+    	        PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/vtk7
177
   		CMAKE_ARGS
175
   		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}"
176
+   	        -DBUILD_SHARED_LIBS:BOOL=ON
177
+	        -DBUILD_EXAMPLES:BOOL=OFF
178
+	        -DBUILD_TESTING:BOOL=OFF
179
+		-DVTK_Group_Web:BOOL=OFF
180
+	        -DModule_vtkImagingMath:BOOL=ON
190
 	  	INSTALL_COMMAND ""
181
 	  	INSTALL_COMMAND ""
191
 	  	LOG_DOWNLOAD 0
182
 	  	LOG_DOWNLOAD 0
192
 	  	LOG_UPDATE 0
183
 	  	LOG_UPDATE 0
193
-	  	DEPENDS zlib
194
 		)
184
 		)
195
 	endif()
185
 	endif()
196
 
186
 
197
-	include(${VTK_USE_FILE}) 
187
+
198
 	add_compile_options(-DLEMMAUSEVTK) 
188
 	add_compile_options(-DLEMMAUSEVTK) 
199
 	# Compile Matplot_vtk if VTK is present
189
 	# Compile Matplot_vtk if VTK is present
200
 	#add_subdirectory(Matplot_vtk)	
190
 	#add_subdirectory(Matplot_vtk)	

Loading…
Cancel
Save