|
@@ -1,5 +1,11 @@
|
1
|
1
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
2
|
2
|
|
|
3
|
+set(LEMMA_VERSION_MAJOR "0")
|
|
4
|
+set(LEMMA_VERSION_MINOR "2")
|
|
5
|
+set(LEMMA_VERSION_PATCH "1")
|
|
6
|
+set(LEMMA_VERSION "\"${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMMA_VERSION_PATCH}\"")
|
|
7
|
+set(LEMMA_VERSION_NOQUOTES "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMMA_VERSION_PATCH}")
|
|
8
|
+
|
3
|
9
|
# Mac OSX RPATH is weird
|
4
|
10
|
# enable @rpath in the install name for any shared library being built
|
5
|
11
|
# note: it is planned that a future version of CMake will enable this by default
|
|
@@ -10,7 +16,9 @@ set(CMAKE_MACOSX_RPATH 1)
|
10
|
16
|
|
11
|
17
|
project (Lemma CXX)
|
12
|
18
|
|
13
|
|
-# required external programs (for runtime of nix, not buildtime)
|
|
19
|
+##############################
|
|
20
|
+# required external programs # for downloading packages
|
|
21
|
+##############################
|
14
|
22
|
FIND_PROGRAM(HAVEGIT git
|
15
|
23
|
PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
|
16
|
24
|
)
|
|
@@ -38,32 +46,19 @@ endif(NOT CMAKE_BUILD_TYPE)
|
38
|
46
|
include(ExternalProject)
|
39
|
47
|
##########################################################################################
|
40
|
48
|
# Eigen, this header-library is used extensively for linear algebra, matrices, and arrays
|
41
|
|
-# Mercurial (hg) repo pull, Would it be better to just download latest stable?
|
42
|
|
-FIND_PROGRAM( HAVEHG hg
|
43
|
|
- PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
|
44
|
|
-)
|
45
|
|
-if (HAVEHG)
|
46
|
|
- ExternalProject_Add(EIGEN
|
47
|
|
- HG_REPOSITORY "https://bitbucket.org/eigen/eigen/"
|
|
49
|
+# Eigen now has an official mirror on GitHub, so Mercurial is no longer a requirement!
|
|
50
|
+ExternalProject_Add(EIGEN
|
|
51
|
+ GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror.git"
|
48
|
52
|
UPDATE_COMMAND ""
|
49
|
|
- HG_TAG "3.3.2" #"default"
|
|
53
|
+ GIT_TAG "3.3.3" #"default"
|
50
|
54
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
|
51
|
55
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
52
|
56
|
)
|
53
|
|
-ELSE()
|
54
|
|
- # Use Stable Eigen instead
|
55
|
|
- ExternalProject_Add(EIGEN
|
56
|
|
- #URL "http://bitbucket.org/eigen/eigen/get/default.tar.gz" # tip from repo
|
57
|
|
- URL "http://bitbucket.org/eigen/eigen/get/3.3.2.tar.gz"
|
58
|
|
- PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
|
59
|
|
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
60
|
|
- )
|
61
|
|
-ENDIF()
|
62
|
57
|
include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3")
|
63
|
58
|
|
64
|
59
|
#############################################################################################
|
65
|
60
|
# Yaml-cpp, this library is used extensively for serialisation of classes (class persistence)
|
66
|
|
-find_package(yaml-cpp)
|
|
61
|
+#find_package(yaml-cpp)
|
67
|
62
|
if (yaml-cpp_FOUND)
|
68
|
63
|
message( STATUS "YAML-CPP FOUND ${yaml-cpp_FOUND}" )
|
69
|
64
|
message( STATUS "YAML-CPP LIBRARIES ${YAML_CPP_LIBRARIES}" )
|
|
@@ -72,16 +67,17 @@ else()
|
72
|
67
|
message( STATUS "YAML-CPP WAS NOT FOUND" )
|
73
|
68
|
ExternalProject_Add(YAML_CPP
|
74
|
69
|
GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
|
75
|
|
- GIT_TAG "master" #"release-0.5.3" #"master"
|
|
70
|
+ GIT_TAG "yaml-cpp-0.6.1" # "master"
|
76
|
71
|
UPDATE_COMMAND ""
|
77
|
72
|
PATCH_COMMAND ""
|
78
|
73
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
|
79
|
|
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
|
80
|
|
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} /
|
81
|
|
- -DYAML_CPP_BUILD_TESTS=OFF
|
|
74
|
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
|
75
|
+ -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
|
76
|
+ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
|
77
|
+ -DYAML_CPP_BUILD_TESTS=OFF
|
82
|
78
|
)
|
|
79
|
+ find_package(yaml-cpp)
|
83
|
80
|
endif()
|
84
|
|
-#add_compile_options(-DHAVE_YAMLCPP)
|
85
|
81
|
|
86
|
82
|
# CxxTest
|
87
|
83
|
find_package(CxxTest)
|
|
@@ -189,7 +185,6 @@ endif()
|
189
|
185
|
|
190
|
186
|
option (LEMMA_VTK8_SUPPORT "VTK library for visualisation and grids" OFF)
|
191
|
187
|
if ( LEMMA_VTK8_SUPPORT )
|
192
|
|
- #find_package(VTK 7 REQUIRED NO_MODULE)
|
193
|
188
|
find_package(VTK 8.0 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources
|
194
|
189
|
vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkInteractionStyle
|
195
|
190
|
vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
|
|
@@ -268,12 +263,6 @@ if (LEMMA_USE_OPENMP)
|
268
|
263
|
endif()
|
269
|
264
|
endif()
|
270
|
265
|
|
271
|
|
-set(LEMMA_VERSION_MAJOR "0")
|
272
|
|
-set(LEMMA_VERSION_MINOR "2")
|
273
|
|
-set(LEMMA_VERSION_PATCH "0")
|
274
|
|
-set(LEMMA_VERSION "\"${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMMA_VERSION_PATCH}\"")
|
275
|
|
-set(LEMMA_VERSION_NOQUOTES "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMMA_VERSION_PATCH}")
|
276
|
|
-
|
277
|
266
|
configure_file (
|
278
|
267
|
"${PROJECT_SOURCE_DIR}/config/LemmaConfig.h.in"
|
279
|
268
|
"${PROJECT_BINARY_DIR}/include/LemmaConfig.h"
|