-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
150 lines (117 loc) · 3.8 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ViSimpl
# 2015-2016 (c) ViSimpl / Universidad Rey Juan Carlos
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ViSimpl project and version
cmake_minimum_required( VERSION 3.1 FATAL_ERROR )
# visimpl project and version
project( visimpl VERSION 1.8.12 )
set( visimpl_VERSION_ABI 6 )
SET( VISIMPL_LICENSE "GPL")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Disable in source building
if( "${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}" )
message( FATAL "no in source building allowed.")
endif()
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake
${CMAKE_SOURCE_DIR}/CMake/common )
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/CMake/common/Common.cmake)
message(FATAL_ERROR "CMake/common missing, run: git submodule update --init")
endif()
if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Debug )
endif( NOT CMAKE_BUILD_TYPE )
if( CMAKE_BUILD_TYPE MATCHES "Debug" )
add_definitions(-DDEBUG)
endif()
if( VISIMPL_OPTIONALS_AS_REQUIRED )
set( VISIMPL_OPTS_FIND_ARGS "REQUIRED" )
else()
set( VISIMPL_OPTS_FIND_ARGS "" )
endif()
include(GitExternal)
# description
set(VISIMPL_DESCRIPTION "Visimpl")
set(COMMON_PROJECT_DOMAIN es.vg-lab)
include(Common)
option(VISIMPL_WITH_ZEQ "VISIMPL_WITH_ZEQ" ON)
option(VISIMPL_WITH_GMRVLEX "VISIMPL_WITH_GMRVLEX" ON)
set(VISIMPL_WITH_OPENMP ON)
set (VISIMPL_BUILD_TESTS OFF CACHE BOOL "Build ViSimpl Tests")
common_find_package( GLM REQUIRED SYSTEM )
common_find_package( Qt5Core 5.4 REQUIRED )
common_find_package( Qt5Gui 5.4 REQUIRED )
common_find_package( Qt5Widgets 5.4 REQUIRED )
common_find_package( Qt5OpenGL REQUIRED )
common_find_package( GLEW REQUIRED SYSTEM )
common_find_package( OpenGL REQUIRED )
common_find_package( Eigen3 REQUIRED SYSTEM)
common_find_package( HDF5 REQUIRED COMPONENTS C CXX )
common_find_package( ReTo REQUIRED )
common_find_package( SimIL REQUIRED )
common_find_package( plab REQUIRED )
common_find_package( scoop REQUIRED )
common_find_package( acuterecorder REQUIRED )
if ( VISIMPL_WITH_OPENMP )
common_find_package( OpenMP )
endif()
common_find_package( Boost REQUIRED )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES
OpenGL
GLEW
Eigen3
ReTo
SimIL
plab
Qt5Core
Qt5Widgets
Qt5OpenGL
Boost
acuterecorder
)
if( OPENMP_FOUND )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES OpenMP )
endif( )
if( VISIMPL_WITH_ZEQ )
common_find_package( ZeroEQ )
if ( ZEROEQ_FOUND )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES ZeroEQ )
common_find_package( Threads ${SIMIL_OPTS_FIND_ARGS} )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES Threads )
common_find_package( Lexis ${SIMIL_OPTS_FIND_ARGS} )
if( LEXIS_FOUND )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES Lexis )
endif( )
if( VISIMPL_WITH_GMRVLEX )
common_find_package( gmrvlex ${SIMIL_OPTS_FIND_ARGS} )
if ( GMRVLEX_FOUND )
list( APPEND VISIMPL_DEPENDENT_LIBRARIES gmrvlex )
endif( )
endif( )
endif( )
endif( )
if (SIMIL_WITH_REST_API)
add_definitions(-DSIMIL_WITH_REST_API=1)
endif()
common_find_package_post()
add_subdirectory( sumrice )
add_subdirectory( visimpl )
add_subdirectory( stackviz )
if(VISIMPL_BUILD_TESTS)
include (CTest)
# Generate coverage information
set(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
set(GCC_COVERAGE_LINK_FLAGS "-lgcov")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}" )
add_subdirectory(tests)
endif()
# importers subdirectory contains code for processing data and convert it
# to ViSimpl formats, not needed for release.
#add_subdirectory( importers )
include( CPackConfig )
include( DoxygenRule )