1
- cmake_minimum_required (VERSION 2.8 )
1
+ cmake_minimum_required (VERSION 3.12 )
2
2
3
3
project (SIMEX)
4
4
@@ -8,35 +8,38 @@ include(CMakeDependentOption)
8
8
if ("${SIMEX_SOURCE_DIR} " STREQUAL "${SIMEX_BINARY_DIR} " )
9
9
message (FATAL_ERROR
10
10
"SIMEX requires an out of source Build. "
11
- "Please create a separate binary directory and run CMake there." )
11
+ "Please create a separate build/ directory and run CMake there." )
12
12
endif ()
13
13
14
14
# set path for modules
15
15
set (SIMEX_CMAKE_DIR "${SIMEX_SOURCE_DIR} /CMake" )
16
16
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SIMEX_CMAKE_DIR} )
17
17
18
+ # Build variant.
18
19
option (DEVELOPER_INSTALL "Install modules only, do not install SimEx files" OFF )
19
-
20
20
option (INSTALL_TESTS "Install tests" ON )
21
+ option (PACKAGE_MAKE "Use this option to create linux packages" OFF )
21
22
22
- # options required for building the py_detector_interface module:
23
+ # Options required for building the py_detector_interface module:
23
24
# XCSITPotonDetector
24
25
option (PY_DETECTOR_INTERFACE_DEBUG "
25
26
-DPY_DETECTOR_INTERFACE_DEBUG=default: OFF | ON"
26
27
)
27
28
28
29
### PYTHON
29
- FIND_PACKAGE (PythonInterp 3.5 REQUIRED)
30
+ FIND_PACKAGE (Python
31
+ 3.5
32
+ REQUIRED
33
+ )
30
34
31
35
set (LIBDIR lib)
32
36
set (INCLUDEDIR include )
33
37
set (BINDIR bin)
34
- set (PYPATH ${LIBDIR} /python${PYTHON_VERSION_MAJOR } .${PYTHON_VERSION_MINOR} )
38
+ set (PYPATH ${LIBDIR} /python${Python_VERSION_MAJOR } .${Python_VERSION_MINOR} /site-packages )
35
39
message ( "PYPATH=${PYPATH} " )
36
40
37
41
set (DOCDIR share/doc )
38
42
39
- option (PACKAGE_MAKE "Use this option to create linux packages" OFF )
40
43
if (PACKAGE_MAKE)
41
44
set (TESTSDIR share/simex/Tests)
42
45
else ()
@@ -60,15 +63,15 @@ message (STATUS "************************ checking python dependencies *********
60
63
add_subdirectory (Sources )
61
64
62
65
#By default all modules are included/excluded depending on this flag.
63
- #If a flag: USE_${module_name} is passed, this will overwrite teh default.
66
+ #If a flag: USE_${module_name} is passed, this will overwrite the default.
64
67
#For example:
65
68
# [De-]activate all modules:
66
69
# cmake -DUSE_MODULES_DEFAULT=[OFF]ON [...]
67
70
# Activate a single module:
68
71
# cmake -DUSE_MODULES_DEFAULT=OFF -DUSE_wpg=ON [...]
69
72
# Deactivate a single module:
70
73
# cmake -DUSE_MODULES_DEFAULT=ON -DUSE_wpg=OFF [...]
71
- option (USE_MODULES_DEFAULT "Default to include/exclude a module" ON )
74
+ option (USE_MODULES_DEFAULT "Default to include/exclude all modules" OFF )
72
75
message (STATUS "**************** Including modules (default "
73
76
"${USE_MODULES_DEFAULT} ) ****************" )
74
77
# find and add modules
@@ -137,6 +140,3 @@ endif()
137
140
138
141
# Add documentation target.
139
142
add_subdirectory ("Sources/doc" )
140
-
141
- # Add extra stuff, e.g. python libs not pip'able.
142
- add_subdirectory ("Sources/python/extra" )
0 commit comments