1 | # *********************************
|
---|
2 | # ************ cmake **************
|
---|
3 | # *********************************
|
---|
4 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
---|
5 | CMAKE_POLICY(SET CMP0043 NEW)
|
---|
6 | CMAKE_POLICY(SET CMP0048 NEW)
|
---|
7 |
|
---|
8 | # Enable debug symbols by default
|
---|
9 | # must be done before project() statement
|
---|
10 | SET(CMAKE_BUILD_TYPE_INIT Release)
|
---|
11 | # (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release)
|
---|
12 |
|
---|
13 | # Enable CLANG as default compilers, to change this use
|
---|
14 | # cmake -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++
|
---|
15 | # Note that if compilers are switched on the fly,
|
---|
16 | # the cache is deleted
|
---|
17 | IF(NOT DEFINED CMAKE_C_COMPILER)
|
---|
18 | FIND_PROGRAM(CMAKE_C_COMPILER NAMES $ENV{CC} clang gcc cc PATHS ENV PATH NO_DEFAULT_PATH DOC "C Compiler")
|
---|
19 | ENDIF()
|
---|
20 | IF(NOT DEFINED CMAKE_CXX_COMPILER)
|
---|
21 | FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES $ENV{CXX} clang++ g++ c++ PATHS ENV PATH NO_DEFAULT_PATH DOC "C++ Compiler")
|
---|
22 | ENDIF()
|
---|
23 |
|
---|
24 | #SET(CMAKE_VERBOSE_MAKEFILE ON)
|
---|
25 |
|
---|
26 | # To check for an include file you do this:
|
---|
27 | #CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
|
---|
28 | # To check the size of a primitive type:
|
---|
29 | #CHECK_TYPE_SIZE("int" SIZEOF_INT)
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | # *********************************
|
---|
34 | # ************ Project ************
|
---|
35 | # *********************************
|
---|
36 |
|
---|
37 | STRING(TIMESTAMP VERSION %y.%U.%w.%H UTC)
|
---|
38 |
|
---|
39 | MESSAGE(STATUS "Mars V${VERSION}")
|
---|
40 |
|
---|
41 | PROJECT(mars VERSION ${VERSION})
|
---|
42 |
|
---|
43 | INCLUDE(GNUInstallDirs)
|
---|
44 |
|
---|
45 | # ======== For config.h.in =========
|
---|
46 | SET(PACKAGE_MAINTAINER "Thomas Bretz")
|
---|
47 | SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de")
|
---|
48 | SET(PACKAGE_URL "https://www.fact-project.org")
|
---|
49 |
|
---|
50 | FIND_PROGRAM(LSB_RELEASE_EXE NAMES lsb_release)
|
---|
51 | IF (DEFINED LSB_RELEASE_EXE)
|
---|
52 | EXECUTE_PROCESS(COMMAND ${LSB_RELEASE_EXE} -d OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
---|
53 | MESSAGE(STATUS ${LSB_RELEASE})
|
---|
54 | ENDIF()
|
---|
55 |
|
---|
56 | # *********************************
|
---|
57 | # ********* Requirements **********
|
---|
58 | # *********************************
|
---|
59 |
|
---|
60 | # Inlclude the main source AND build dir itself
|
---|
61 | #SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
---|
62 | SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
---|
63 |
|
---|
64 | # =========== help2man ============
|
---|
65 | FIND_PROGRAM(HELP2MAN_EXECUTABLE help2man)
|
---|
66 |
|
---|
67 | # =========== pkg-config ============
|
---|
68 | FIND_PACKAGE(PkgConfig)
|
---|
69 | FIND_PACKAGE(PackageHandleStandardArgs)
|
---|
70 |
|
---|
71 |
|
---|
72 | # ============= libnova ==============
|
---|
73 |
|
---|
74 | PKG_CHECK_MODULES(Nova QUIET Nova)
|
---|
75 |
|
---|
76 | # Try to locate the package in the default path
|
---|
77 | # and in the path provided by pkg-config
|
---|
78 | FIND_PATH(NOVA_INCLUDE_DIR NAMES libnova/libnova.h PATHS ${NOVA_INCLUDE_DIRS})
|
---|
79 | FIND_LIBRARY(NOVA_LIBRARY NAMES nova PATHS ${NOVA_LIBRARY_DIRS})
|
---|
80 |
|
---|
81 | # Check if NOVA_LIBARARY and NOVA_INCLUDE_DIR is set
|
---|
82 | # Print a message otherwise
|
---|
83 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Nova DEFAULT_MSG NOVA_LIBRARY NOVA_INCLUDE_DIR)
|
---|
84 |
|
---|
85 | # Mark those variables to be displayed as 'advanced' in the GUI
|
---|
86 | MARK_AS_ADVANCED(NOVA_LIBRARY NOVA_INCLUDE_DIR)
|
---|
87 |
|
---|
88 | # handle success
|
---|
89 | FIND_PACKAGE_MESSAGE(NovaInc "Found Nova headers in ${NOVA_INCLUDE_DIR}" "[${NOVA_LIBRARY}][${NOVA_INCLUDE_DIR}]")
|
---|
90 |
|
---|
91 |
|
---|
92 | # ============== libz ================
|
---|
93 |
|
---|
94 | FIND_PACKAGE(ZLIB REQUIRED)
|
---|
95 |
|
---|
96 | # ============== ROOT ================
|
---|
97 |
|
---|
98 | FIND_PROGRAM(ROOTCONFIG_EXECUTABLE NAMES root-config)
|
---|
99 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(root-config DEFAULT_MSG ROOTCONFIG_EXECUTABLE)
|
---|
100 | IF(NOT ROOTCONFIG_EXECUTABLE)
|
---|
101 | MESSAGE(FATAL_ERROR "Please make sure `root-config` is accessible in your path. In case of an installation from source, you might need to source\n . [path-to-root]/bin/thisroot.sh")
|
---|
102 | ENDIF()
|
---|
103 |
|
---|
104 | # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
|
---|
105 | # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
|
---|
106 | # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
|
---|
107 | IF(EXISTS $ENV{ROOTSYS}/ROOTConfig.cmake)
|
---|
108 | IF(NOT DEFINED ENV{CMAKE_PREFIX_PATH})
|
---|
109 | LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
|
---|
110 | ENDIF()
|
---|
111 | ENDIF()
|
---|
112 | SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
|
---|
113 |
|
---|
114 | #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
|
---|
115 | FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)
|
---|
116 |
|
---|
117 | IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
|
---|
118 | FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS} [${ROOT_VERSION}]" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}][${ROOT_VERSION}]")
|
---|
119 | ENDIF()
|
---|
120 |
|
---|
121 | #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
|
---|
122 | IF(DEFINED ROOT_USE_FILE)
|
---|
123 | FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_USE_FILE}" "[${ROOT_USE_FILE}]")
|
---|
124 | INCLUDE(${ROOT_USE_FILE})
|
---|
125 | ELSE()
|
---|
126 | FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: ${ROOT_VERSION}" "[${ROOT_VERSION}]")
|
---|
127 | # From RootUseFile.cmake (root 6)
|
---|
128 | INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
|
---|
129 | LINK_DIRECTORIES(${ROOT_LIBRARY_DIR})
|
---|
130 | ADD_DEFINITIONS(${ROOT_DEFINITIONS})
|
---|
131 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}")
|
---|
132 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_C_FLAGS}")
|
---|
133 | SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${ROOT_fortran_FLAGS}")
|
---|
134 | ENDIF()
|
---|
135 |
|
---|
136 | # -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree
|
---|
137 | # -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread
|
---|
138 | # -lASImage -lMinuit -lHistPainter -lThread
|
---|
139 |
|
---|
140 | #MESSAGE("INCL_DIRS: ${ROOT_INCLUDE_DIRS}")
|
---|
141 | #MESSAGE("LIBS: ${ROOT_LIBRARIES}")
|
---|
142 | #MESSAGE("DEFS: ${ROOT_DEFINITIONS}")
|
---|
143 | #MESSAGE("CXXFLAGS: ${ROOT_CXX_FLAGS}")
|
---|
144 | #MESSAGE("CXFLAGS: ${ROOT_CC_FLAGS}")
|
---|
145 | #MESSAGE("FOUND: ${ROOT_FOUND}")
|
---|
146 | #MESSAGE("FILE: ${ROOT_USE_FILE}")
|
---|
147 | #MESSAGE("DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
|
---|
148 | #ROOT_<library>_LIBRARY PATH Full path for each of the ROOT libraries listed in COMPONENTS
|
---|
149 | #ROOT_<command>_CMD PATH Full path for each ROOT executable (rootcling, root, hadd, etc.)
|
---|
150 | #ROOT_<option>_FOUND BOOL True for each enabled build option (e.g. cocoa, python, xrootd, etc.)
|
---|
151 |
|
---|
152 | # function ROOT_GENERATE_DICTIONARY( dictionary
|
---|
153 | # header1 header2 ...
|
---|
154 | # LINKDEF linkdef1 ...
|
---|
155 | # OPTIONS opt1...)
|
---|
156 |
|
---|
157 | # *********************************
|
---|
158 | # ********** Observatory **********
|
---|
159 | # *********************************
|
---|
160 |
|
---|
161 | SET(OBSERVATORY "ORM" CACHE STRING "Select the observatory location (ORM, HAWC, SPM, RWTH: see nova.h)")
|
---|
162 |
|
---|
163 | IF(NOT OBSERVATORY STREQUAL "ORM" AND
|
---|
164 | NOT OBSERVATORY STREQUAL "HAWC" AND
|
---|
165 | NOT OBSERVATORY STREQUAL "SPM" AND
|
---|
166 | NOT OBSERVATORY STREQUAL "RWTH")
|
---|
167 | MESSAGE(FATAL_ERROR "OBSERVATORY=${OBSERVATORY} invalid. Only ORM, HAWC, SPM and RWTH allowd!")
|
---|
168 | ENDIF()
|
---|
169 |
|
---|
170 | FIND_PACKAGE_MESSAGE(PresetObservatory "Preset Observatory: ${OBSERVATORY}" "[${OBSERVATORY}]")
|
---|
171 |
|
---|
172 |
|
---|
173 | # *********************************
|
---|
174 | # *********** Compiler ************
|
---|
175 | # *********************************
|
---|
176 |
|
---|
177 | SET(CMAKE_CXX_STANDARD 11)
|
---|
178 | SET(CMAKE_CXX_FLAGS
|
---|
179 | "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
|
---|
180 | -Wcast-align -Wformat -Woverloaded-virtual \
|
---|
181 | -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra
|
---|
182 |
|
---|
183 | SET(CMAKE_CXX_FLAGS
|
---|
184 | "${CMAKE_CXX_FLAGS} \
|
---|
185 | -DMARSVER=\\\"1.0\\\" -D_REENTRANT -D__MARS__ -D__LINUX__ \
|
---|
186 | -DPACKAGE_VERSION=\\\"1.0\\\" -DREVISION=\\\"1.0\\\" \
|
---|
187 | -DPACKAGE_NAME=\\\"MARS\\\" -DHAVE_ZLIB")
|
---|
188 |
|
---|
189 | CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/root.rc.in" "${PROJECT_BINARY_DIR}/.rootrc")
|
---|
190 | CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/rootlogon.C.in" "${PROJECT_BINARY_DIR}/rootlogon.C")
|
---|
191 | CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/dohtml.C.in" "${PROJECT_BINARY_DIR}/dohtml.C")
|
---|
192 |
|
---|
193 | # -------------------------------------------------------
|
---|
194 |
|
---|
195 | FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary)
|
---|
196 |
|
---|
197 | MACRO(SRCFILES subdir)
|
---|
198 |
|
---|
199 | MESSAGE(STATUS "Reading source list from ${DIR}/Makefile")
|
---|
200 |
|
---|
201 | EXECUTE_PROCESS(COMMAND
|
---|
202 | ${PROJECT_SOURCE_DIR}/Makefile.extract.sh ${subdir}
|
---|
203 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/${subdir}
|
---|
204 | OUTPUT_VARIABLE _HEADERS)
|
---|
205 |
|
---|
206 | SEPARATE_ARGUMENTS(_HEADERS)
|
---|
207 |
|
---|
208 | LIST(GET _HEADERS 0 _CINT)
|
---|
209 | LIST(REMOVE_AT _HEADERS 0)
|
---|
210 |
|
---|
211 | SET(_SRCLIST ${_HEADERS})
|
---|
212 |
|
---|
213 | STRING(REPLACE "${subdir}/" " " _HEADERS ${_HEADERS}) # Remove directory
|
---|
214 | STRING(REPLACE ".cc" ".h" _HEADERS ${_HEADERS}) # change extension
|
---|
215 | STRING(REPLACE ".cxx" ".hxx" _HEADERS ${_HEADERS}) # special for files in mmc
|
---|
216 |
|
---|
217 | SEPARATE_ARGUMENTS(_HEADERS)
|
---|
218 |
|
---|
219 | # - This adds the rule how the dictionary is created
|
---|
220 | ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${subdir}/${_CINT}LinkDef.h OPTIONS -p -D__MARS__ -DHAVE_ZLIB)
|
---|
221 | # - This makes sure that it is compiled
|
---|
222 | TARGET_SOURCES(mars PRIVATE dictionary/${_CINT}.cxx ${_SRCLIST})
|
---|
223 | SET_SOURCE_FILES_PROPERTIES(dictionary/${_CINT}.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register")
|
---|
224 |
|
---|
225 | INSTALL(DIRECTORY ${subdir}/ DESTINATION "include" FILES_MATCHING PATTERN "*.h")
|
---|
226 |
|
---|
227 | ENDMACRO()
|
---|
228 |
|
---|
229 | # -------------------------------------------------------
|
---|
230 |
|
---|
231 | #SET(DIRECTORIES mmc)
|
---|
232 |
|
---|
233 | SET(DIRECTORIES
|
---|
234 | manalysis
|
---|
235 | mastro
|
---|
236 | mbadpixels
|
---|
237 | mbase
|
---|
238 | mcalib
|
---|
239 | mcamera
|
---|
240 | mcorsika
|
---|
241 | mdata
|
---|
242 | mdrs
|
---|
243 | melectronics
|
---|
244 | mextralgo
|
---|
245 | mfbase
|
---|
246 | mfileio
|
---|
247 | mfilter
|
---|
248 | mgeom
|
---|
249 | mgui
|
---|
250 | mhbase
|
---|
251 | mhcalib
|
---|
252 | mhflux
|
---|
253 | mhft
|
---|
254 | mhist
|
---|
255 | mhvstime
|
---|
256 | mimage
|
---|
257 | mjobs
|
---|
258 | mjoptim
|
---|
259 | mjtrain
|
---|
260 | mmain
|
---|
261 | mmc
|
---|
262 | mmovie
|
---|
263 | mmuon
|
---|
264 | mpedestal
|
---|
265 | mpointing
|
---|
266 | mranforest
|
---|
267 | mraw
|
---|
268 | mreport
|
---|
269 | msignal
|
---|
270 | msim
|
---|
271 | msimcamera
|
---|
272 | msimreflector
|
---|
273 | msql
|
---|
274 | mtools
|
---|
275 | mtrigger
|
---|
276 | )
|
---|
277 |
|
---|
278 | INCLUDE_DIRECTORIES(${DIRECTORIES} mcore .)
|
---|
279 |
|
---|
280 | ROOT_GENERATE_DICTIONARY(dictionary/Core
|
---|
281 | mcore/factofits.h
|
---|
282 | mcore/factfits.h
|
---|
283 | mcore/DrsCalib.h
|
---|
284 | mcore/PixelMap.h
|
---|
285 | mcore/Interpolator2D.h
|
---|
286 | mcore/nova.h
|
---|
287 | mcore/Prediction.h
|
---|
288 | MIncl.h
|
---|
289 | LINKDEF MLinkDef.h
|
---|
290 | OPTIONS -p -D__MARS__ -DHAVE_ZLIB)
|
---|
291 |
|
---|
292 | ADD_LIBRARY(mars SHARED dictionary/Core.cxx) # CMAKE_POSITION_INDEPENDENT_CODE
|
---|
293 | SET_SOURCE_FILES_PROPERTIES(dictionary/Core.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register")
|
---|
294 | TARGET_LINK_LIBRARIES(mars
|
---|
295 | ZLIB::ZLIB
|
---|
296 | ${NOVA_LIBRARY}
|
---|
297 | ${ROOT_LIBRARIES})
|
---|
298 |
|
---|
299 | ADD_EXECUTABLE(showplot showplot.cc)
|
---|
300 | ADD_EXECUTABLE(showlog showplot.cc)
|
---|
301 | ADD_EXECUTABLE(ceres ceres.cc)
|
---|
302 | TARGET_LINK_LIBRARIES(showplot mars ${ROOT_LIBRARIES})
|
---|
303 | TARGET_LINK_LIBRARIES(showlog mars ${ROOT_LIBRARIES})
|
---|
304 | TARGET_LINK_LIBRARIES(ceres mars ${ROOT_LIBRARIES})
|
---|
305 |
|
---|
306 |
|
---|
307 | FOREACH(DIR ${DIRECTORIES})
|
---|
308 | SRCFILES(${DIR})
|
---|
309 | ENDFOREACH()
|
---|
310 |
|
---|
311 | # rootlogon.C finds the shared object only if the libmars.so is in the same directory than the dictionary files
|
---|
312 | # there is a way to create a map file with rootcling - but I haven#t yet fugured out how. Note that a link is not enough
|
---|
313 | #ADD_CUSTOM_COMMAND(TARGET mars POST_BUILD
|
---|
314 | # COMMAND cp -f ${PROJECT_BINARY_DIR}/libmars.so ${PROJECT_BINARY_DIR}/dictionary/libmars.so
|
---|
315 | # COMMENT "Copying libmars.so to ${PROJECT_BINARY_DIR}/dictionary")
|
---|
316 |
|
---|
317 | #---Create a shared library with geneated dictionary
|
---|
318 | #ADD_LIBRARY(Event SHARED Event.cxx G__Event.cxx)
|
---|
319 | #TARGET_LINK_LIBRARIES(Event ${ROOT_LIBRARIES})
|
---|
320 |
|
---|
321 | #---Create a main program using the library
|
---|
322 | #ADD_EXECUTABLE(Main MainEvent.cxx)
|
---|
323 | #TARGET_LINK_LIBRARIES(Main Event)
|
---|
324 |
|
---|
325 |
|
---|
326 | # *********************************
|
---|
327 | # ************ Packaging **********
|
---|
328 | # *********************************
|
---|
329 |
|
---|
330 | #SET(PKG_SHARE "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}")
|
---|
331 | #SET(PKG_APPS "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
---|
332 | #SET(PKG_PIXMAPS "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps")
|
---|
333 |
|
---|
334 | # ====== Installation targets =====
|
---|
335 |
|
---|
336 | #INSTALL(TARGETS mars DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
337 | INSTALL(TARGETS mars DESTINATION ".")
|
---|
338 | INSTALL(TARGETS showplot DESTINATION ".")
|
---|
339 | INSTALL(TARGETS showlog DESTINATION ".")
|
---|
340 | INSTALL(TARGETS ceres DESTINATION ".")
|
---|
341 | INSTALL(FILES .rootrc DESTINATION ".")
|
---|
342 | INSTALL(DIRECTORY lib DESTINATION ".")
|
---|
343 | INSTALL(DIRECTORY macros DESTINATION "." FILES_MATCHING PATTERN "*.C")
|
---|
344 | INSTALL(DIRECTORY fact DESTINATION "." FILES_MATCHING PATTERN "*.C")
|
---|
345 | INSTALL(DIRECTORY datacenter DESTINATION ".")
|
---|
346 | INSTALL(DIRECTORY scripts DESTINATION ".")
|
---|
347 | INSTALL(DIRECTORY resources DESTINATION "." FILES_MATCHING PATTERN "*.rc" PATTERN "*.txt")
|
---|
348 | INSTALL(DIRECTORY resmc DESTINATION "." FILES_MATCHING PATTERN "*" )
|
---|
349 | INSTALL(DIRECTORY mcore/ DESTINATION "include" FILES_MATCHING PATTERN "*.h")
|
---|
350 |
|
---|
351 |
|
---|
352 | # ======== General packaging ======
|
---|
353 | # https://cmake.org/cmake/help/latest/module/CPack.html
|
---|
354 |
|
---|
355 | INCLUDE(InstallRequiredSystemLibraries)
|
---|
356 |
|
---|
357 | # SET(CPACK_STRIP_FILES ON) # Strip debug sysmbold from files
|
---|
358 |
|
---|
359 | SET(CPACK_PACKAGE_VERSION "${mars_VERSION}")
|
---|
360 | SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
|
---|
361 | SET(CPACK_PACKAGE_MAINTAINER "${PACKAGE_MAINTAINER}")
|
---|
362 | #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
---|
363 | #SET(CPACK_PACKAGE_VENDOR "Me, myself, and I")
|
---|
364 |
|
---|
365 |
|
---|
366 | SET(CPACK_SOURCE_IGNORE_FILES "/old/;/build/;/[.].*/;/autom4te[.]cache/;.*~;.log$")
|
---|
367 |
|
---|
368 | # Maybe the text displayed in synaptic?
|
---|
369 | #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
|
---|
370 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MARS - Environment")
|
---|
371 | #CPACK_RESOURCE_FILE_README ReadMe file to be embedded in the installer.
|
---|
372 |
|
---|
373 | SET(CPACK_GENERATOR TBZ2) # TGZ DEB
|
---|
374 | #SET(CPACK_SOURCE_GENERATOR TBZ2) # TGZ
|
---|
375 | #SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/cmake/Package.txt)
|
---|
376 | #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
---|
377 |
|
---|
378 |
|
---|
379 | # ======== Debian packaging =======
|
---|
380 | # https://cmake.org/cmake/help/latest/module/CPackDeb.html
|
---|
381 | # https://www.debian.org/doc/debian-policy
|
---|
382 |
|
---|
383 | #SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libao4 (>=1.0), libsfm-system2.3v5 (>=2.3), libsfml-graphicsv2.3v5 (>=2.3), libsfml-audio2.3v5 (>=2.3), libsfm-window2.3v5 (>2.3)")
|
---|
384 | SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS 1) # generate better (atomatic?) dependecies
|
---|
385 | SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
|
---|
386 | SET(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
|
---|
387 | SET(CPACK_DEBIAN_PACKAGE_SECTION utils)
|
---|
388 | SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PACKAGE_URL}")
|
---|
389 | SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION
|
---|
390 | "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
|
---|
391 | This package contains the MARS Analysis Environment.")
|
---|
392 | #indent the long description with spaces
|
---|
393 |
|
---|
394 | #CPACK_INSTALL_CMAKE_PROJECTS
|
---|
395 | #List of four values that specify what project to install. Build directory, Project Name, Project Component, Directory.
|
---|
396 |
|
---|
397 | INCLUDE(CPack)
|
---|