|
@@ -18,12 +18,12 @@ if(NOT HAVEGIT)
|
18
|
18
|
message(FATAL_ERROR "Lemma requires that git is installed and in the path of your machine")
|
19
|
19
|
endif(NOT HAVEGIT)
|
20
|
20
|
|
21
|
|
-# FIND_PROGRAM(HAVEHG hg
|
22
|
|
-# PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
|
23
|
|
-# )
|
24
|
|
-# if(NOT HAVEHG)
|
25
|
|
-# message(STATUS "Mercurial (hg) was not found.")
|
26
|
|
-# endif(NOT HAVEHG)
|
|
21
|
+FIND_PROGRAM(HAVEHG hg
|
|
22
|
+ PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
|
|
23
|
+)
|
|
24
|
+if(NOT HAVEHG)
|
|
25
|
+ message(STATUS "Mercurial (hg) was not found.")
|
|
26
|
+endif(NOT HAVEHG)
|
27
|
27
|
|
28
|
28
|
option(BUILD_SHARED_LIBS OFF)
|
29
|
29
|
if(BUILD_SHARED_LIBS)
|
|
@@ -38,19 +38,23 @@ endif()
|
38
|
38
|
include(ExternalProject)
|
39
|
39
|
# Eigen, this header-library is used extensively for linear algebra, matrices, and arrays
|
40
|
40
|
# Mercurial (hg) repo pull, Would it be better to just download latest stable?
|
41
|
|
-#ExternalProject_Add(EIGEN
|
42
|
|
-# HG_REPOSITORY "https://bitbucket.org/eigen/eigen/"
|
43
|
|
-# UPDATE_COMMAND ""
|
44
|
|
-# PATCH_COMMAND ""
|
45
|
|
-# PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
|
46
|
|
-# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
47
|
|
-#)
|
|
41
|
+if (HAVEHG)
|
|
42
|
+ExternalProject_Add(EIGEN
|
|
43
|
+ HG_REPOSITORY "https://bitbucket.org/eigen/eigen/"
|
|
44
|
+ UPDATE_COMMAND ""
|
|
45
|
+ HG_TAG "default"
|
|
46
|
+ PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
|
|
47
|
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
|
48
|
+)
|
|
49
|
+ELSE()
|
48
|
50
|
# Stable Eigen, requires manual updating when new releases, but lighter weight.
|
49
|
51
|
ExternalProject_Add(EIGEN
|
50
|
52
|
URL "http://bitbucket.org/eigen/eigen/get/3.2.7.tar.gz"
|
|
53
|
+ #URL "http://bitbucket.org/eigen/eigen/get/default.tar.gz" # tip from repo
|
51
|
54
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
|
52
|
55
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
53
|
56
|
)
|
|
57
|
+ENDIF()
|
54
|
58
|
|
55
|
59
|
# Yaml-cpp, this library is used extensively for serialisation of classes (class persistence)
|
56
|
60
|
ExternalProject_Add(YAML-CPP
|
|
@@ -96,8 +100,8 @@ if ( LEMMA_MATIO_SUPPORT )
|
96
|
100
|
endif()
|
97
|
101
|
|
98
|
102
|
# We don't build VTK, it is too heavy.
|
99
|
|
-option (LEMMA_VTK_SUPPORT "VTK library for visualisation and grids" OFF)
|
100
|
|
-if ( LEMMA_VTK_SUPPORT )
|
|
103
|
+option (LEMMA_VTK6_SUPPORT "VTK library for visualisation and grids" OFF)
|
|
104
|
+if ( LEMMA_VTK6_SUPPORT )
|
101
|
105
|
#find_package(VTK 6 REQUIRED NO_MODULE)
|
102
|
106
|
find_package(VTK 6.0 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources
|
103
|
107
|
vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkInteractionStyle
|
|
@@ -110,6 +114,20 @@ if ( LEMMA_VTK_SUPPORT )
|
110
|
114
|
include_directories ("${PROJECT_SOURCE_DIR}/Matplot_vtk")
|
111
|
115
|
endif()
|
112
|
116
|
|
|
117
|
+option (LEMMA_VTK7_SUPPORT "VTK library for visualisation and grids" OFF)
|
|
118
|
+if ( LEMMA_VTK7_SUPPORT )
|
|
119
|
+ #find_package(VTK 7 REQUIRED NO_MODULE)
|
|
120
|
+ find_package(VTK 7.0 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources
|
|
121
|
+ vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkInteractionStyle
|
|
122
|
+ vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
|
|
123
|
+ set(volumeRenderer volumerenderer.cxx)
|
|
124
|
+ include(${VTK_USE_FILE})
|
|
125
|
+ add_compile_options(-DLEMMAUSEVTK)
|
|
126
|
+ # Compile Matplot_vtk if VTK is present
|
|
127
|
+ add_subdirectory(Matplot_vtk)
|
|
128
|
+ include_directories ("${PROJECT_SOURCE_DIR}/Matplot_vtk")
|
|
129
|
+endif()
|
|
130
|
+
|
113
|
131
|
#####################
|
114
|
132
|
# Lemma Configuration
|
115
|
133
|
#####################
|