|
@@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.8.7)
|
2
|
2
|
|
3
|
3
|
project (Lemma CXX)
|
4
|
4
|
|
5
|
|
-
|
6
|
5
|
# required external programs (for runtime of nix, not buildtime)
|
7
|
6
|
FIND_PROGRAM(HAVEGIT git
|
8
|
7
|
PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
|
|
@@ -45,7 +44,7 @@ ExternalProject_Add(YAML-CPP
|
45
|
44
|
UPDATE_COMMAND ""
|
46
|
45
|
PATCH_COMMAND ""
|
47
|
46
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
|
48
|
|
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
|
47
|
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=ON
|
49
|
48
|
)
|
50
|
49
|
add_compile_options(-DHAVE_YAMLCPP)
|
51
|
50
|
|
|
@@ -80,25 +79,24 @@ if ( MATIO_SUPPORT )
|
80
|
79
|
)
|
81
|
80
|
endif()
|
82
|
81
|
|
83
|
|
-#####################
|
84
|
|
-# Lemma Configuration
|
85
|
|
-#####################
|
86
|
|
-project(LEMMA_CXX)
|
87
|
|
-
|
88
|
|
-# We don't Build VTK, it is too much.
|
|
82
|
+# We don't build VTK, it is too heavy.
|
89
|
83
|
option (VTK_SUPPORT "VTK library for visualisation and grids" OFF)
|
90
|
84
|
if (VTK_SUPPORT)
|
91
|
85
|
find_package(VTK 6 REQUIRED NO_MODULE)
|
92
|
86
|
include(${VTK_USE_FILE})
|
93
|
87
|
add_compile_options(-DLEMMAUSEVTK)
|
94
|
|
-
|
95
|
88
|
# Compile Matplot_vtk if VTK is present
|
96
|
89
|
add_subdirectory(Matplot_vtk)
|
97
|
90
|
include_directories ("${PROJECT_SOURCE_DIR}/Matplot_vtk")
|
98
|
|
-
|
99
|
91
|
endif()
|
100
|
92
|
|
|
93
|
+#####################
|
|
94
|
+# Lemma Configuration
|
|
95
|
+#####################
|
|
96
|
+
|
|
97
|
+####################
|
101
|
98
|
# Add the c++11 flag
|
|
99
|
+# TODO add compiler specific instructions
|
102
|
100
|
include(CheckCXXCompilerFlag)
|
103
|
101
|
CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
|
104
|
102
|
CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
|
|
@@ -107,14 +105,13 @@ if(COMPILER_SUPPORTS_CXX11)
|
107
|
105
|
elseif(COMPILER_SUPPORTS_CXX0X)
|
108
|
106
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
109
|
107
|
else()
|
110
|
|
- message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
|
108
|
+ message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
111
|
109
|
endif()
|
112
|
|
-#add_compile_options(-std=c++11)
|
113
|
110
|
|
114
|
111
|
set(LEMMA_VERSION_MAJOR "0")
|
115
|
112
|
set(LEMMA_VERSION_MINOR "0")
|
116
|
|
-set(LEMMA_VERSION_PATCH "0")
|
117
|
|
-#set(LEMMA_VERSION "${LEMMA_CPP_VERSION_MAJOR}_${LEMMA_CPP_VERSION_MINOR}_${LEMMA_CPP_VERSION_PATCH}")
|
|
113
|
+set(LEMMA_VERSION_PATCH "1")
|
|
114
|
+set(LEMMA_VERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMMA_VERSION_PATCH}")
|
118
|
115
|
|
119
|
116
|
configure_file (
|
120
|
117
|
"${PROJECT_SOURCE_DIR}/include/LemmaConfig.h.in"
|
|
@@ -128,9 +125,12 @@ include_directories ("${CMAKE_INSTALL_PREFIX}/include/")
|
128
|
125
|
link_directories ("${CMAKE_INSTALL_PREFIX}/lib/")
|
129
|
126
|
add_subdirectory (LemmaCore)
|
130
|
127
|
|
131
|
|
-# TODO add compiler specific instructions
|
132
|
|
-
|
|
128
|
+########################################################################
|
|
129
|
+# Build Modules
|
|
130
|
+add_subdirectory (Modules)
|
133
|
131
|
|
|
132
|
+########################################################################
|
|
133
|
+#
|
134
|
134
|
include_directories(${CMAKE_INSTALL_PREFIX}/include)
|
135
|
135
|
add_executable(Hello "${PROJECT_SOURCE_DIR}/src/test.cpp")
|
136
|
136
|
target_link_libraries(Hello lemmacore)
|