Browse Source

Merge branch 'master' of https://git.lemmasoftware.org/Lemma

enhancement_3
Trevor Irons 8 years ago
parent
commit
ab42ba1918
2 changed files with 17 additions and 13 deletions
  1. 12
    8
      CMakeLists.txt
  2. 5
    5
      LemmaCore/CMakeLists.txt

+ 12
- 8
CMakeLists.txt View File

68
 add_compile_options(-DHAVE_YAMLCPP) 
68
 add_compile_options(-DHAVE_YAMLCPP) 
69
 
69
 
70
 # tinyxml2, this library is used for XML IO 
70
 # tinyxml2, this library is used for XML IO 
71
-option(TINYXML_SUPPORT  "MATIO library support for MATLAB .mat files" OFF)
72
-if ( TINYXML_SUPPORT )
71
+option( LEMMA_TINYXML_SUPPORT  "MATIO library support for MATLAB .mat files" OFF)
72
+if ( LEMMA_TINYXML_SUPPORT )
73
 	ExternalProject_Add(TINYXML2
73
 	ExternalProject_Add(TINYXML2
74
 		GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
74
 		GIT_REPOSITORY "https://github.com/leethomason/tinyxml2.git"
75
 		GIT_TAG  "master"
75
 		GIT_TAG  "master"
82
 	add_compile_options(-DTINYXMLSUPPORT) 
82
 	add_compile_options(-DTINYXMLSUPPORT) 
83
 endif()
83
 endif()
84
 
84
 
85
-option(MATIO_SUPPORT  "MATIO library support for MATLAB .mat files" OFF)
86
-if ( MATIO_SUPPORT )
85
+option( LEMMA_MATIO_SUPPORT  "MATIO library support for MATLAB .mat files" OFF)
86
+if ( LEMMA_MATIO_SUPPORT )
87
 	add_compile_options(-DHAVE_MATIO) 
87
 	add_compile_options(-DHAVE_MATIO) 
88
 	# matio, this library is used for MATLAB file IO
88
 	# matio, this library is used for MATLAB file IO
89
 	ExternalProject_ADD(MATIO
89
 	ExternalProject_ADD(MATIO
100
 endif()
100
 endif()
101
 
101
 
102
 # We don't build VTK, it is too heavy.
102
 # We don't build VTK, it is too heavy.
103
-option (VTK_SUPPORT "VTK library for visualisation and grids" OFF)
104
-if (VTK_SUPPORT) 
105
-	find_package(VTK 6 REQUIRED NO_MODULE)
106
-	include(${VTK_USE_FILE})
103
+option (LEMMA_VTK_SUPPORT "VTK library for visualisation and grids" OFF)
104
+if ( LEMMA_VTK_SUPPORT ) 
105
+	#find_package(VTK 6 REQUIRED NO_MODULE)
106
+	find_package(VTK 6.0 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources 
107
+			vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkInteractionStyle 
108
+			vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL NO_MODULE)
109
+	set(volumeRenderer volumerenderer.cxx)
110
+	include(${VTK_USE_FILE}) 
107
 	add_compile_options(-DLEMMAUSEVTK) 
111
 	add_compile_options(-DLEMMAUSEVTK) 
108
 	# Compile Matplot_vtk if VTK is present
112
 	# Compile Matplot_vtk if VTK is present
109
 	add_subdirectory(Matplot_vtk)	
113
 	add_subdirectory(Matplot_vtk)	

+ 5
- 5
LemmaCore/CMakeLists.txt View File

19
 
19
 
20
 # Linking
20
 # Linking
21
 add_dependencies(lemmacore YAML-CPP)
21
 add_dependencies(lemmacore YAML-CPP)
22
-if (TINYXML_SUPPORT)
22
+if (LEMMA_TINYXML_SUPPORT)
23
 	add_dependencies(lemmacore TINYXML2)
23
 	add_dependencies(lemmacore TINYXML2)
24
 endif()
24
 endif()
25
-if (MATIO_SUPPORT)
25
+if (LEMMA_MATIO_SUPPORT)
26
 	add_dependencies(lemmacore MATIO)
26
 	add_dependencies(lemmacore MATIO)
27
 endif()
27
 endif()
28
-if (VTK_SUPPORT) 
28
+if (LEMMA_VTK_SUPPORT) 
29
 	target_link_libraries(lemmacore ${VTK_LIBRARIES})
29
 	target_link_libraries(lemmacore ${VTK_LIBRARIES})
30
 	target_link_libraries(lemmacore "matplot")
30
 	target_link_libraries(lemmacore "matplot")
31
 endif()
31
 endif()
34
 # Install
34
 # Install
35
 install ( TARGETS lemmacore DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
35
 install ( TARGETS lemmacore DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
36
 
36
 
37
-option( LEMMABUILDEXAMPLES "Compile example Lemma applications" OFF )
38
-if (LEMMABUILDEXAMPLES)
37
+option( LEMMA_BUILD_EXAMPLES "Compile example Lemma applications" OFF )
38
+if (LEMMA_BUILD_EXAMPLES)
39
 	add_subdirectory(examples)
39
 	add_subdirectory(examples)
40
 endif()
40
 endif()

Loading…
Cancel
Save