1 | # *********************************
|
---|
2 | # ************ cmake **************
|
---|
3 | # *********************************
|
---|
4 | CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
|
---|
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=Debug)
|
---|
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 |
|
---|
25 | #SET(CMAKE_VERBOSE_MAKEFILE ON)
|
---|
26 |
|
---|
27 |
|
---|
28 | # *********************************
|
---|
29 | # ************ Project ************
|
---|
30 | # *********************************
|
---|
31 |
|
---|
32 | STRING(TIMESTAMP VERSION %y.%U.%w.%H UTC)
|
---|
33 |
|
---|
34 | MESSAGE(STATUS "FACT++ V${VERSION}")
|
---|
35 |
|
---|
36 | PROJECT(fact++ VERSION ${VERSION})
|
---|
37 |
|
---|
38 | INCLUDE(GNUInstallDirs)
|
---|
39 |
|
---|
40 | IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
---|
41 | SET(GCC_MIN 4.4.7)
|
---|
42 | IF (CMAKE_C_COMPILER_VERSION VERSION_LESS GCC_MIN OR
|
---|
43 | CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_MIN)
|
---|
44 | MESSAGE(FATAL_ERROR "\n gcc/g++ ${GCC_MIN} or higher is required.\n You are running version ${CMAKE_C_COMPILER_VERSION}/${CMAKE_CXX_COMPILER_VERSION}.")
|
---|
45 | ENDIF()
|
---|
46 | ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
---|
47 | SET(CLANG_MIN 3.8)
|
---|
48 | IF (CMAKE_C_COMPILER_VERSION VERSION_LESS CLANG_MIN OR
|
---|
49 | CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_MIN)
|
---|
50 | MESSAGE(FATAL_ERROR "\n clang/clang++ ${CLANG_MIN} or higher is required.\n You are running version ${CMAKE_C_COMPILER_VERSION}/${CMAKE_CXX_COMPILER_VERSION}.")
|
---|
51 | ENDIF()
|
---|
52 | ELSE()
|
---|
53 | MESSAGE(WARNING "You are using an unsupported compiler! Compilation has only been tested only with clang/clang++ and gcc/g++.")
|
---|
54 | ENDIF()
|
---|
55 |
|
---|
56 | # ======== For config.h.in =========
|
---|
57 | SET(PACKAGE_MAINTAINER "Thomas Bretz")
|
---|
58 | SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de")
|
---|
59 | SET(PACKAGE_URL "https://www.fact-project.org")
|
---|
60 |
|
---|
61 | FIND_PROGRAM(LSB_RELEASE_EXE NAMES lsb_release)
|
---|
62 | IF (DEFINED LSB_RELEASE_EXE)
|
---|
63 | EXECUTE_PROCESS(COMMAND ${LSB_RELEASE_EXE} -d OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
---|
64 | MESSAGE(STATUS ${LSB_RELEASE})
|
---|
65 | ENDIF()
|
---|
66 |
|
---|
67 | # *********************************
|
---|
68 | # ******** FAMOUS / IceACT ********
|
---|
69 | # *********************************
|
---|
70 |
|
---|
71 | #SET(OBSERVATORY "ORM" CACHE STRING "Select the observatory location (ORM, HAWC, SPM, RWTH: see nova.h)")
|
---|
72 |
|
---|
73 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
74 |
|
---|
75 | IF(EXISTS "${CMAKE_SOURCE_DIR}/famous")
|
---|
76 | MESSAGE(STATUS "Compilation of 'famous' enabled.")
|
---|
77 | SET(FOUND_FAMOUS ON)
|
---|
78 | ENDIF()
|
---|
79 |
|
---|
80 | IF(EXISTS "${CMAKE_SOURCE_DIR}/iceact")
|
---|
81 | MESSAGE(STATUS "Compilation of 'iceact' enabled.")
|
---|
82 | SET(FOUND_ICEACT ON)
|
---|
83 | ENDIF()
|
---|
84 |
|
---|
85 | ENDIF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
86 |
|
---|
87 |
|
---|
88 | # *********************************
|
---|
89 | # ********* Requirements **********
|
---|
90 | # *********************************
|
---|
91 |
|
---|
92 | # =========== pkg-config ============
|
---|
93 | FIND_PACKAGE(PkgConfig)
|
---|
94 | FIND_PACKAGE(PackageHandleStandardArgs)
|
---|
95 |
|
---|
96 |
|
---|
97 | # ========== executables ==========
|
---|
98 | FIND_PROGRAM(HELP2MAN_EXECUTABLE help2man)
|
---|
99 | FIND_PROGRAM(ROFF2HTML_EXECUTABLE roff2html)
|
---|
100 | FIND_PROGRAM(ROFF2PDF_EXECUTABLE roff2pdf)
|
---|
101 | FIND_PROGRAM(GROFF_EXECUTABLE groff)
|
---|
102 |
|
---|
103 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(help2man DEFAULT_MSG HELP2MAN_EXECUTABLE)
|
---|
104 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(roff2html DEFAULT_MSG ROFF2HTML_EXECUTABLE)
|
---|
105 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(roff2pdf DEFAULT_MSG ROFF2PDF_EXECUTABLE)
|
---|
106 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(groff DEFAULT_MSG GROFF_EXECUTABLE)
|
---|
107 |
|
---|
108 | IF (NOT HELP2MAN_EXECUTABLE OR NOT ROFF2HTML_EXECUTABLE OR NOT ROFF2PDF_EXECUTABLE OR NOT GROFF_EXECUTABLE)
|
---|
109 | MESSAGE(STATUS "Documentation turned off (some executables missing).")
|
---|
110 | ENDIF()
|
---|
111 |
|
---|
112 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
113 |
|
---|
114 | FIND_PROGRAM(JSDOC_EXECUTABLE jsdoc)
|
---|
115 | FIND_PROGRAM(MAILX_EXECUTABLE mailx)
|
---|
116 | FIND_PROGRAM(CURL_EXECUTABLE curl)
|
---|
117 |
|
---|
118 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(curl DEFAULT_MSG CURL_EXECUTABLE)
|
---|
119 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(mailx DEFAULT_MSG MAILX_EXECUTABLE)
|
---|
120 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(jsdoc DEFAULT_MSG JSDOC_EXECUTABLE)
|
---|
121 |
|
---|
122 | IF (curl_FOUND)
|
---|
123 | ADD_DEFINITIONS(-DHAVE_CURL)
|
---|
124 | ENDIF()
|
---|
125 | IF (mailx_FOUND)
|
---|
126 | ADD_DEFINITIONS(-DHAVE_MAILX)
|
---|
127 | ENDIF()
|
---|
128 |
|
---|
129 | ENDIF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
130 |
|
---|
131 | #IF(NOT SOME_COND)
|
---|
132 | # MESSAGE(FATAL_ERROR "At least one required executable was not found")
|
---|
133 | #ENDIF()
|
---|
134 |
|
---|
135 | # =========== libraries =============
|
---|
136 |
|
---|
137 | SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
---|
138 |
|
---|
139 | # FIXME: Need to check which package finders accept REQUIERED. For all others implement checks
|
---|
140 |
|
---|
141 | FIND_PACKAGE(Threads REQUIRED) # Threads::Threads
|
---|
142 | FIND_PACKAGE(ZLIB REQUIRED) # ZLIB::ZLIB
|
---|
143 |
|
---|
144 | SET(CURSES_NEED_NCURSES ON)
|
---|
145 | FIND_PACKAGE(Curses REQUIRED) # CURSES_FOUND
|
---|
146 | # FIXME : Require panel
|
---|
147 |
|
---|
148 | IF(NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
149 | FIND_PACKAGE(OpenGL REQUIRED) # OpenGL::GL OpenGL::GLU / OPENGL_FOUND OPENGL_GLU_FOUND
|
---|
150 | ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
151 |
|
---|
152 | IF(NOT TOOLS_ONLY)
|
---|
153 |
|
---|
154 | # FIND_PACKAGE(DBus) => skaypeclient
|
---|
155 | # FIND_PACKAGE(Motif) => did # MOTIF_FOUND
|
---|
156 |
|
---|
157 | FIND_PACKAGE(Readline REQUIRED)
|
---|
158 | FIND_PACKAGE(Panel REQUIRED)
|
---|
159 | FIND_PACKAGE(V8 REQUIRED)
|
---|
160 | FIND_PACKAGE(CCfits REQUIRED) # First as Cfitsio is a dependency
|
---|
161 | FIND_PACKAGE(Cfitsio REQUIRED)
|
---|
162 | FIND_PACKAGE(OpenSSL REQUIRED) # Required for boost::asio::ssl
|
---|
163 |
|
---|
164 | ENDIF(NOT TOOLS_ONLY)
|
---|
165 |
|
---|
166 | FIND_PACKAGE(Nova REQUIRED)
|
---|
167 |
|
---|
168 | #INCLUDE_DIRECTORIES("/usr/include/mysql")
|
---|
169 | # dbus-1 dbus-glib-1
|
---|
170 | # doxygen
|
---|
171 |
|
---|
172 | #MESSAGE("")
|
---|
173 | #MESSAGE(${V8_LIBRARY})
|
---|
174 | #MESSAGE(${MYSQLPP_LIBRARY})
|
---|
175 | #MESSAGE(${PANEL_LIBRARY})
|
---|
176 | #MESSAGE(${CURSES_LIBRARIES})
|
---|
177 | #MESSAGE(${CCFITS_LIBRARY})
|
---|
178 | #MESSAGE(${CFITSIO_LIBRARY})
|
---|
179 | #MESSAGE(${MYSQL_LIBRARY})
|
---|
180 | #MESSAGE(${NOVA_LIBRARY})
|
---|
181 | #MESSAGE(${READLINE_LIBRARY})
|
---|
182 | #MESSAGE(${OPENSSL_SSL_LIBRARY})
|
---|
183 | #MESSAGE("")
|
---|
184 |
|
---|
185 | # =============== MySQL ============
|
---|
186 |
|
---|
187 | INCLUDE(GetPrerequisites)
|
---|
188 |
|
---|
189 | FIND_PACKAGE(MySQL++ REQUIRED)
|
---|
190 |
|
---|
191 | IF(NOT DEFINED MYSQL_LIBRARY AND NOT CMAKE_VERSION VERSION_LESS 3.6)
|
---|
192 | GET_PREREQUISITES(${MYSQLPP_LIBRARY} MYSQL_LIBRARY 0 0 "" "")
|
---|
193 | LIST(FILTER MYSQL_LIBRARY INCLUDE REGEX .*mysqlclient.*)
|
---|
194 | IF (DEFINED MYSQL_LIBRARY)
|
---|
195 | FIND_PACKAGE_MESSAGE(MysqlLib "MySQL++ links to ${MYSQL_LIBRARY}" "[${MYSQL_LIBRARY}]")
|
---|
196 | ENDIF()
|
---|
197 | ENDIF()
|
---|
198 |
|
---|
199 | FIND_PACKAGE(MySQL REQUIRED)
|
---|
200 |
|
---|
201 | INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR} ${MYSQLPP_INCLUDE_DIR})
|
---|
202 |
|
---|
203 |
|
---|
204 | # =============== BOOST ============
|
---|
205 | # 1.47.0 is the newest version available at ISDC
|
---|
206 | FIND_PACKAGE(Boost 1.47.0 REQUIRED
|
---|
207 | date_time
|
---|
208 | filesystem
|
---|
209 | program_options
|
---|
210 | regex
|
---|
211 | system
|
---|
212 | thread)
|
---|
213 |
|
---|
214 | IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND Boost_VERSION LESS 106000 AND NOT NO_BOOST_HACK)
|
---|
215 | MESSAGE(STATUS " BOOST_REGEX_NO_EXTERNAL_TEMPLATES")
|
---|
216 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_REGEX_NO_EXTERNAL_TEMPLATES=1")
|
---|
217 | ENDIF()
|
---|
218 |
|
---|
219 | # At least print some information for reference
|
---|
220 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Boost FOUND_VAR Boost_FOUND REQUIRED_VARS Boost_INCLUDE_DIR Boost_LIBRARIES)
|
---|
221 |
|
---|
222 | # =============== QT4 ==============
|
---|
223 | IF(NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
224 |
|
---|
225 | FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtXml)
|
---|
226 | FIND_PACKAGE(Qwt REQUIRED)
|
---|
227 |
|
---|
228 | ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
229 |
|
---|
230 | # ============== ROOT ================
|
---|
231 |
|
---|
232 | FIND_PROGRAM(ROOTCONFIG_EXECUTABLE NAMES root-config)
|
---|
233 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(root-config DEFAULT_MSG ROOTCONFIG_EXECUTABLE)
|
---|
234 | IF(NOT ROOTCONFIG_EXECUTABLE)
|
---|
235 | 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")
|
---|
236 | ENDIF()
|
---|
237 |
|
---|
238 | # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
|
---|
239 | # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
|
---|
240 | # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
|
---|
241 | IF(EXISTS $ENV{ROOTSYS}/ROOTConfig.cmake)
|
---|
242 | IF(NOT DEFINED ENV{CMAKE_PREFIX_PATH})
|
---|
243 | LIST(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
|
---|
244 | ENDIF()
|
---|
245 | ENDIF()
|
---|
246 | SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake")
|
---|
247 |
|
---|
248 | #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
|
---|
249 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
250 | # SET(ROOT_CONFIG_DEBUG 1)
|
---|
251 | FIND_PACKAGE(ROOT OPTIONAL_COMPONENTS GQt TreePlayer )
|
---|
252 | ENDIF()
|
---|
253 |
|
---|
254 | IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE)
|
---|
255 | FIND_PACKAGE_MESSAGE(RootFound "Found ROOT: ${ROOT_INCLUDE_DIRS}" "[${ROOT_INCLUDE_DIRS}][${ROOT_LIBRARY_DIR}][${ROOT_VERSION}]")
|
---|
256 | ENDIF()
|
---|
257 |
|
---|
258 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND NOT ROOT_GQt_LIBRARY)
|
---|
259 | IF(ROOT_VERSION VERSION_LESS 6.18)
|
---|
260 | MESSAGE(FATAL_ERROR "Root version [${ROOT_VERSION}] less than 6.18, but component GQt not found.")
|
---|
261 | ELSE()
|
---|
262 | MESSAGE(WARNING "Root version [${ROOT_VERSION}] does not support GQt, GUI [fact] turned off.")
|
---|
263 | ENDIF()
|
---|
264 | ENDIF()
|
---|
265 |
|
---|
266 | #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
|
---|
267 | FIND_PACKAGE_MESSAGE(RootInclude "Setup ROOT: [${ROOT_VERSION}] ${ROOT_USE_FILE}" "[${ROOT_VERSION}][${ROOT_USE_FILE}]")
|
---|
268 | IF(DEFINED ROOT_USE_FILE)
|
---|
269 | INCLUDE(${ROOT_USE_FILE})
|
---|
270 | ELSE()
|
---|
271 | # From RootUseFile.cmake (root 6)
|
---|
272 | INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
|
---|
273 | LINK_DIRECTORIES(${ROOT_LIBRARY_DIR})
|
---|
274 | ADD_DEFINITIONS(${ROOT_DEFINITIONS})
|
---|
275 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}")
|
---|
276 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_C_FLAGS}")
|
---|
277 | SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${ROOT_fortran_FLAGS}")
|
---|
278 | ENDIF()
|
---|
279 |
|
---|
280 | # -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree
|
---|
281 | # -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread
|
---|
282 | # -lASImage -lMinuit -lHistPainter -lThread
|
---|
283 |
|
---|
284 | #MESSAGE("INCL_DIRS: ${ROOT_INCLUDE_DIRS}")
|
---|
285 | #MESSAGE("LIBS: ${ROOT_LIBRARIES}")
|
---|
286 | #MESSAGE("DEFS: ${ROOT_DEFINITIONS}")
|
---|
287 | #MESSAGE("CXXFLAGS: ${ROOT_CXX_FLAGS}")
|
---|
288 | #MESSAGE("CXFLAGS: ${ROOT_CC_FLAGS}")
|
---|
289 | #MESSAGE("FOUND: ${ROOT_FOUND}")
|
---|
290 | #MESSAGE("FILE: ${ROOT_USE_FILE}")
|
---|
291 | #MESSAGE("DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
|
---|
292 | #ROOT_<library>_LIBRARY PATH Full path for each of the ROOT libraries listed in COMPONENTS
|
---|
293 | #ROOT_<command>_CMD PATH Full path for each ROOT executable (rootcling, root, hadd, etc.)
|
---|
294 | #ROOT_<option>_FOUND BOOL True for each enabled build option (e.g. cocoa, python, xrootd, etc.)
|
---|
295 |
|
---|
296 | # function ROOT_GENERATE_DICTIONARY( dictionary
|
---|
297 | # header1 header2 ...
|
---|
298 | # LINKDEF linkdef1 ...
|
---|
299 | # OPTIONS opt1...)
|
---|
300 |
|
---|
301 | # *********************************
|
---|
302 | # ********** Observatory **********
|
---|
303 | # *********************************
|
---|
304 |
|
---|
305 | SET(OBSERVATORY "ORM" CACHE STRING "Select the observatory location (ORM, HAWC, SPM, RWTH: see nova.h)")
|
---|
306 |
|
---|
307 | IF(NOT OBSERVATORY STREQUAL "ORM" AND
|
---|
308 | NOT OBSERVATORY STREQUAL "HAWC" AND
|
---|
309 | NOT OBSERVATORY STREQUAL "SPM" AND
|
---|
310 | NOT OBSERVATORY STREQUAL "RWTH")
|
---|
311 | MESSAGE(FATAL_ERROR "OBSERVATORY=${OBSERVATORY} invalid. Only ORM, HAWC, SPM and RWTH allowd!")
|
---|
312 | ENDIF()
|
---|
313 |
|
---|
314 | FIND_PACKAGE_MESSAGE(PresetObservatory "Preset Observatory: ${OBSERVATORY}" "[${OBSERVATORY}]")
|
---|
315 |
|
---|
316 | # *********************************
|
---|
317 | # *********** Compiler ************
|
---|
318 | # *********************************
|
---|
319 |
|
---|
320 | SET(CMAKE_CXX_STANDARD 11)
|
---|
321 |
|
---|
322 | #ADD_DEFINITIONS(-D__CMAKE__)
|
---|
323 |
|
---|
324 | SET(CMAKE_CXX_FLAGS
|
---|
325 | "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
|
---|
326 | -Wcast-align -Wformat=2 -Woverloaded-virtual \
|
---|
327 | -Wnon-virtual-dtor -Wshadow -Wno-unknown-pragmas") # -Wextra
|
---|
328 |
|
---|
329 | # -D__MARS__
|
---|
330 | SET(CMAKE_CXX_FLAGS
|
---|
331 | "${CMAKE_CXX_FLAGS} \
|
---|
332 | -D_REENTRANT -D__LINUX__ \
|
---|
333 | -DHAVE_ZLIB -DHAVE_ROOT -DHAVE_V8 -DHAVE_SQL -DHAVE_NOVA -DHAVE_FITS -DPRESET_OBSERVATORY=k${OBSERVATORY} \
|
---|
334 | -DMARSVER=\\\"${VERSION}\\\" \
|
---|
335 | -DPACKAGE_VERSION=\\\"${VERSION}\\\" \
|
---|
336 | -DREVISION=\\\"${REVISION}\\\" \
|
---|
337 | -DPACKAGE_NAME=\\\"FACT++\\\" \
|
---|
338 | -DPACKAGE_STRING=\\\"FACT++\\\" \
|
---|
339 | -DPACKAGE_URL=\\\"${PACKAGE_URL}\\\" \
|
---|
340 | -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\""
|
---|
341 | )
|
---|
342 |
|
---|
343 | # -DBOOST_DISABLE_ASSERTS \
|
---|
344 | # -DBOOST_NO_STD_LOCALE=1 \
|
---|
345 | # -DBOOST_REXEG_NO_FWD=1 \
|
---|
346 | # -DBOOST_NO_MEMBER_TEMPLATES=1 \
|
---|
347 | # -DBOOST_HAS_ABI_HEADERS=1 \
|
---|
348 |
|
---|
349 | # Flags required for Dim
|
---|
350 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux")
|
---|
351 |
|
---|
352 |
|
---|
353 | # -------------------------------------------------------
|
---|
354 | # Inlclude the main source AND build dir itself
|
---|
355 | SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
---|
356 | SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
---|
357 |
|
---|
358 | INCLUDE_DIRECTORIES(pal)
|
---|
359 | INCLUDE_DIRECTORIES(erfa/src)
|
---|
360 | INCLUDE_DIRECTORIES(dim/dim)
|
---|
361 | INCLUDE_DIRECTORIES(externals)
|
---|
362 | INCLUDE_DIRECTORIES(src)
|
---|
363 |
|
---|
364 | # ********************************************************
|
---|
365 | # ********************** Libraries ***********************
|
---|
366 | # ********************************************************
|
---|
367 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
368 |
|
---|
369 | # =================== libPointing.so ======================
|
---|
370 | ADD_LIBRARY(Pointing SHARED
|
---|
371 | pal/pal.h
|
---|
372 | pal/palDtt.c pal/palDat.c pal/palMappa.c
|
---|
373 | pal/palPrenut.c pal/palEvp.c pal/palAoppa.c
|
---|
374 | pal/palAoppat.c pal/palRefco.c pal/palRefro.c
|
---|
375 | pal/pal1Atmt.c pal/palDrange.c pal/palOne2One.c
|
---|
376 | pal/pal1Atms.c pal/palMapqkz.c pal/palAopqk.c
|
---|
377 | pal/palRefz.c pal/palAmpqk.c pal/palRdplan.c
|
---|
378 | pal/palDt.c pal/palPvobs.c pal/palNut.c
|
---|
379 | pal/palDmoon.c pal/palPlanet.c pal/palNutc.c
|
---|
380 | pal/palDeuler.c
|
---|
381 | erfa/src/gd2gc.c erfa/src/p06e.c erfa/src/c2s.c
|
---|
382 | erfa/src/eform.c erfa/src/s2c.c erfa/src/pas.c
|
---|
383 | erfa/src/pmat06.c erfa/src/epv00.c erfa/src/plan94.c
|
---|
384 | erfa/src/anpm.c erfa/src/obl06.c erfa/src/dat.c
|
---|
385 | erfa/src/af2a.c erfa/src/rxr.c erfa/src/gmst06.c
|
---|
386 | erfa/src/sepp.c erfa/src/rz.c erfa/src/zp.c
|
---|
387 | erfa/src/rxpv.c erfa/src/pn.c erfa/src/cr.c
|
---|
388 | erfa/src/seps.c erfa/src/ry.c erfa/src/pdp.c
|
---|
389 | erfa/src/pnm06a.c erfa/src/hfk5z.c erfa/src/epj2jd.c
|
---|
390 | erfa/src/pv2s.c erfa/src/tf2a.c erfa/src/pm.c
|
---|
391 | erfa/src/sxp.c erfa/src/a2af.c erfa/src/rxp.c
|
---|
392 | erfa/src/pxp.c erfa/src/fk5hip.c erfa/src/fw2m.c
|
---|
393 | erfa/src/rx.c erfa/src/tf2d.c erfa/src/cal2jd.c
|
---|
394 | erfa/src/cp.c erfa/src/nut06a.c erfa/src/rm2v.c
|
---|
395 | erfa/src/nut00a.c erfa/src/ee06a.c erfa/src/fk5hz.c
|
---|
396 | erfa/src/epb2jd.c erfa/src/refco.c erfa/src/a2tf.c
|
---|
397 | erfa/src/fapa03.c erfa/src/gst06a.c erfa/src/faf03.c
|
---|
398 | erfa/src/faur03.c erfa/src/faju03.c erfa/src/fal03.c
|
---|
399 | erfa/src/fasa03.c erfa/src/fame03.c erfa/src/fave03.c
|
---|
400 | erfa/src/fama03.c erfa/src/faom03.c erfa/src/gst06.c
|
---|
401 | erfa/src/jd2cal.c erfa/src/gd2gce.c erfa/src/anp.c
|
---|
402 | erfa/src/fae03.c erfa/src/ir.c erfa/src/pfw06.c
|
---|
403 | erfa/src/bpn2xy.c erfa/src/eors.c erfa/src/s06.c
|
---|
404 | erfa/src/trxp.c erfa/src/era00.c erfa/src/epj.c
|
---|
405 | erfa/src/d2tf.c erfa/src/epb.c erfa/src/rv2m.c
|
---|
406 | erfa/src/pap.c erfa/src/fad03.c erfa/src/pmp.c
|
---|
407 | erfa/src/tr.c erfa/src/falp03.c)
|
---|
408 | TARGET_LINK_LIBRARIES(Pointing PUBLIC m)
|
---|
409 |
|
---|
410 | # ======================= libDim.so ======================
|
---|
411 | ADD_LIBRARY(Dim SHARED
|
---|
412 | # dim/dim/dic.h
|
---|
413 | # dim/dim/dim_common.h
|
---|
414 | # dim/dim/dim.h
|
---|
415 | # dim/dim/dim_tcpip.h
|
---|
416 | # dim/dim/dis.h
|
---|
417 | dim/src/dic.c
|
---|
418 | dim/src/dis.c
|
---|
419 | dim/src/dna.c
|
---|
420 | dim/src/sll.c
|
---|
421 | dim/src/dll.c
|
---|
422 | dim/src/hash.c
|
---|
423 | dim/src/swap.c
|
---|
424 | dim/src/copy_swap.c
|
---|
425 | dim/src/open_dns.c
|
---|
426 | dim/src/conn_handler.c
|
---|
427 | dim/src/tcpip.c
|
---|
428 | dim/src/dtq.c
|
---|
429 | dim/src/dim_thr.c
|
---|
430 | dim/src/utilities.c)
|
---|
431 |
|
---|
432 | # ================= libDimExtension.so ===================
|
---|
433 | ADD_LIBRARY(DimExtension SHARED
|
---|
434 | # src/DimSetup.h
|
---|
435 | src/DimSetup.cc)
|
---|
436 | TARGET_LINK_LIBRARIES(DimExtension PUBLIC
|
---|
437 | Boost::system)
|
---|
438 |
|
---|
439 | # ===================== libDim++.so ======================
|
---|
440 | ADD_LIBRARY(Dim++ SHARED
|
---|
441 | # dim/dim/dic.hxx
|
---|
442 | # dim/dim/dis.hxx
|
---|
443 | # dim/dim/dim_core.hxx
|
---|
444 | # dim/dim/dim.hxx
|
---|
445 | # dim/dim/dim_tcpip.h
|
---|
446 | # dim/dim/dllist.hxx
|
---|
447 | # dim/dim/sllist.hxx
|
---|
448 | # dim/dim/tokenstring.hxx
|
---|
449 | # src/Dim.h
|
---|
450 | dim/src/diccpp.cxx
|
---|
451 | dim/src/dimcpp.cxx
|
---|
452 | dim/src/discpp.cxx
|
---|
453 | dim/src/tokenstring.cxx)
|
---|
454 | TARGET_LINK_LIBRARIES(Dim++ PUBLIC Dim)
|
---|
455 |
|
---|
456 | # ================= libStateMachine.so ===================
|
---|
457 | ADD_LIBRARY(StateMachine SHARED
|
---|
458 | src/WindowLog.h src/WindowLog.cc
|
---|
459 | src/Readline.h src/Readline.cc
|
---|
460 | src/ReadlineColor.h src/ReadlineColor.cc
|
---|
461 | src/ReadlineWindow.h src/ReadlineWindow.cc
|
---|
462 | src/Console.h src/Console.cc
|
---|
463 | src/Shell.h src/Shell.cc
|
---|
464 | src/EventImp.h src/EventImp.cc
|
---|
465 | src/Event.h src/Event.cc
|
---|
466 | src/State.h src/State.cc
|
---|
467 | src/Description.h src/Description.cc
|
---|
468 | src/MessageImp.h src/MessageImp.cc
|
---|
469 | src/Converter.h src/Converter.cc
|
---|
470 | src/StateMachineImp.h src/StateMachineImp.cc
|
---|
471 | src/StateMachine.h src/StateMachine.cc
|
---|
472 | src/EventDim.h
|
---|
473 | src/MessageDim.h src/MessageDim.cc
|
---|
474 | src/StateMachineDim.h src/StateMachineDim.cc
|
---|
475 | src/DimServerList.h src/DimServerList.cc
|
---|
476 | src/DimServiceInfoList.h src/DimServiceInfoList.cc
|
---|
477 | # src/DimNetworkList.h src/DimNetwork.cc
|
---|
478 | src/ServiceList.h src/ServiceList.cc
|
---|
479 | src/DimErrorRedirecter.h
|
---|
480 | src/DimErrorRedirecter.cc
|
---|
481 | src/DimDescriptionService.h
|
---|
482 | src/DimDescriptionService.cc
|
---|
483 | src/Connection.h src/Connection.cc
|
---|
484 | src/ConnectionUSB.h src/ConnectionUSB.cc
|
---|
485 | src/ConnectionSSL.h src/ConnectionSSL.cc
|
---|
486 | # FACT.h ByteOrder.h
|
---|
487 | src/DimWriteStatistics.h src/DimWriteStatistics.cc)
|
---|
488 | TARGET_LINK_LIBRARIES(StateMachine PUBLIC
|
---|
489 | readline ${CURSES_LIBRARIES} panel
|
---|
490 | Tools Time Dim++
|
---|
491 | Boost::regex
|
---|
492 | Boost::thread
|
---|
493 | Boost::filesystem
|
---|
494 | OpenSSL::SSL)
|
---|
495 |
|
---|
496 | ENDIF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
497 |
|
---|
498 | # ================= libConfiguration.so ==================
|
---|
499 | ADD_LIBRARY(Configuration SHARED
|
---|
500 | src/Configuration.h src/Configuration.cc
|
---|
501 | src/FACT.h src/FACT.cc)
|
---|
502 | TARGET_LINK_LIBRARIES(Configuration PUBLIC
|
---|
503 | Boost::regex
|
---|
504 | Boost::system
|
---|
505 | Boost::filesystem
|
---|
506 | Boost::program_options
|
---|
507 | ${MYSQL_LIBRARY} ${MYSQLPP_LIBRARY})
|
---|
508 |
|
---|
509 | # ===================== libTime.so =======================
|
---|
510 | ADD_LIBRARY(Time SHARED
|
---|
511 | src/Time.h src/Time.cc)
|
---|
512 | TARGET_LINK_LIBRARIES(Time PUBLIC ${NOVA_LIBRARY})
|
---|
513 |
|
---|
514 | # ===================== libTools.so ======================
|
---|
515 | ADD_LIBRARY(Tools SHARED
|
---|
516 | src/tools.h src/tools.cc)
|
---|
517 |
|
---|
518 |
|
---|
519 |
|
---|
520 | # ********************************************************
|
---|
521 | # ********************** Manuals *************************
|
---|
522 | # ********************************************************
|
---|
523 |
|
---|
524 | IF (NOT VIEWER_ONLY)
|
---|
525 |
|
---|
526 | FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/man1)
|
---|
527 | FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/html)
|
---|
528 | FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/pdf)
|
---|
529 |
|
---|
530 | MACRO(MANPAGE program description)
|
---|
531 | # https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
|
---|
532 | IF (HELP2MAN_EXECUTABLE AND ROFF2HTML_EXECUTABLE AND ROFF2PDF_EXECUTABLE AND GROFF_EXECUTABLE)
|
---|
533 | ADD_CUSTOM_COMMAND(
|
---|
534 | OUTPUT
|
---|
535 | man1/${program}.1
|
---|
536 | DEPENDS
|
---|
537 | ${program}
|
---|
538 | COMMAND
|
---|
539 | ${HELP2MAN_EXECUTABLE}
|
---|
540 | ${PROJECT_BINARY_DIR}/${program}
|
---|
541 | -n "${description}"
|
---|
542 | --no-info
|
---|
543 | --output=man1/${program}.1
|
---|
544 | COMMAND
|
---|
545 | ${GROFF_EXECUTABLE}
|
---|
546 | -mandoc man1/${program}.1
|
---|
547 | -T html > html/${program}.html
|
---|
548 | COMMAND
|
---|
549 | ${GROFF_EXECUTABLE}
|
---|
550 | -mandoc man1/${program}.1
|
---|
551 | -T pdf > pdf/${program}.pdf
|
---|
552 | COMMENT
|
---|
553 | "Generating man-page ${program}.1"
|
---|
554 | VERBATIM)
|
---|
555 |
|
---|
556 | ADD_CUSTOM_TARGET(${program}.man ALL DEPENDS man1/${program}.1)
|
---|
557 |
|
---|
558 | INSTALL(FILES ${PROJECT_BINARY_DIR}/man1/${program}.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
---|
559 | ENDIF()
|
---|
560 | ENDMACRO()
|
---|
561 |
|
---|
562 |
|
---|
563 |
|
---|
564 |
|
---|
565 | # ********************************************************
|
---|
566 | # *********************** Helpers ************************
|
---|
567 | # ********************************************************
|
---|
568 |
|
---|
569 | SET(HELP++LIBS Tools Configuration Time)
|
---|
570 |
|
---|
571 | # --------------------------------------------------------
|
---|
572 |
|
---|
573 | ADD_EXECUTABLE(fitsdump src/fitsdump.cc)
|
---|
574 | TARGET_LINK_LIBRARIES(fitsdump ${HELP++LIBS} ${ROOT_LIBRARIES} ZLIB::ZLIB)
|
---|
575 | MANPAGE(fitsdump "FACT++ - fitsdump - Read and dump contents of a FITStable")
|
---|
576 |
|
---|
577 | #ADD_EXECUTABLE(fitsloader src/fitsloader.cc)
|
---|
578 | #TARGET_LINK_LIBRARIES(fitsloader ${HELP++LIBS})
|
---|
579 | #MANPAGE(fitsloader "")
|
---|
580 |
|
---|
581 | #ADD_EXECUTABLE(fitscheck src/fitscheck.cc)
|
---|
582 | #TARGET_LINK_LIBRARIES(fitscheck ${HELP++LIBS} ZLIB::ZLIB)
|
---|
583 | #MANPAGE(fitscheck "")
|
---|
584 |
|
---|
585 | #ADD_EXECUTABLE(fitsCompressor src/fitsCompressor.cc)
|
---|
586 | #TARGET_LINK_LIBRARIES(fitsCompressor ${HELP++LIBS} ZLIB::ZLIB)
|
---|
587 | #MANPAGE(fitsCompressor "")
|
---|
588 |
|
---|
589 | #ADD_EXECUTABLE(fitsselect src/fitsselect.cc)
|
---|
590 | #TARGET_LINK_LIBRARIES(fitsselect ${HELP++LIBS} ZLIB::ZLIB)
|
---|
591 | #MANPAGE(fitsselect "")
|
---|
592 |
|
---|
593 | #ADD_EXECUTABLE(readfits src/readfits.cc)
|
---|
594 | #TARGET_LINK_LIBRARIES(readfits ${HELP++LIBS} ZLIB::ZLIB)
|
---|
595 | #MANPAGE(readfits "")
|
---|
596 |
|
---|
597 | ADD_EXECUTABLE(rootifysql src/rootifysql.cc)
|
---|
598 | TARGET_LINK_LIBRARIES(rootifysql ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
599 | MANPAGE(rootifysql "FACT++ - rootifysql - Write result of a SQL query into a root-file")
|
---|
600 |
|
---|
601 | ADD_EXECUTABLE(root2sql src/root2sql.cc)
|
---|
602 | TARGET_LINK_LIBRARIES(root2sql ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
603 | MANPAGE(root2sql "FACT++ - root2sql - Fill contents of a root-tree into a MySQL database")
|
---|
604 |
|
---|
605 | ADD_EXECUTABLE(root2csv src/root2csv.cc)
|
---|
606 | TARGET_LINK_LIBRARIES(root2csv ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
607 | MANPAGE(root2csv "FACT++ - root2csv - Convert a root-tree to a csv file")
|
---|
608 |
|
---|
609 | ADD_EXECUTABLE(csv2root src/csv2root.cc)
|
---|
610 | TARGET_LINK_LIBRARIES(csv2root ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
611 | MANPAGE(csv2root "FACT++ - csv2root - Convert a csv file to a root-tree")
|
---|
612 |
|
---|
613 | ADD_EXECUTABLE(fits2sql src/fits2sql.cc)
|
---|
614 | TARGET_LINK_LIBRARIES(fits2sql ${HELP++LIBS} ZLIB::ZLIB)
|
---|
615 | MANPAGE(fits2sql "FACT++ - fits2sql - Fill contents of a FITS table into a MySQL database")
|
---|
616 |
|
---|
617 | ADD_EXECUTABLE(showlog src/showlog.cc src/WindowLog.cc)
|
---|
618 | TARGET_LINK_LIBRARIES(showlog Threads::Threads ${HELP++LIBS} ${CURSES_LIBRARIES})
|
---|
619 | MANPAGE(showlog "")
|
---|
620 |
|
---|
621 | ADD_EXECUTABLE(zfits src/zfits.cc)
|
---|
622 | TARGET_LINK_LIBRARIES(zfits ${HELP++LIBS} ZLIB::ZLIB)
|
---|
623 | MANPAGE(zfits "")
|
---|
624 |
|
---|
625 | ADD_EXECUTABLE(calcsource src/calcsource.cc)
|
---|
626 | TARGET_LINK_LIBRARIES(calcsource ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
627 | MANPAGE(calcsource "")
|
---|
628 |
|
---|
629 | ADD_EXECUTABLE(calcsourcemc src/calcsourcemc.cc)
|
---|
630 | TARGET_LINK_LIBRARIES(calcsourcemc ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
631 | MANPAGE(calcsourcemc "")
|
---|
632 |
|
---|
633 | ADD_EXECUTABLE(getevent src/getevent.cc)
|
---|
634 | TARGET_LINK_LIBRARIES(getevent ${HELP++LIBS} ZLIB::ZLIB)
|
---|
635 | MANPAGE(getevent "")
|
---|
636 |
|
---|
637 | ENDIF(NOT VIEWER_ONLY)
|
---|
638 |
|
---|
639 | IF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
640 |
|
---|
641 | ADD_EXECUTABLE(makeplots src/makeplots.cc)
|
---|
642 | TARGET_LINK_LIBRARIES(makeplots ${HELP++LIBS} ${ROOT_LIBRARIES})
|
---|
643 | MANPAGE(makeplots "")
|
---|
644 |
|
---|
645 | ADD_EXECUTABLE(makedata src/makedata.cc)
|
---|
646 | TARGET_LINK_LIBRARIES(makedata ${HELP++LIBS})
|
---|
647 | MANPAGE(makedata "")
|
---|
648 |
|
---|
649 | ADD_EXECUTABLE(makeschedule src/makeschedule.cc)
|
---|
650 | TARGET_LINK_LIBRARIES(makeschedule ${HELP++LIBS})
|
---|
651 | MANPAGE(makeschedule "")
|
---|
652 |
|
---|
653 | ADD_EXECUTABLE(moon src/moon.cc)
|
---|
654 | TARGET_LINK_LIBRARIES(moon ${HELP++LIBS})
|
---|
655 | MANPAGE(moon "")
|
---|
656 |
|
---|
657 | # ********************************************************
|
---|
658 | # ********************* Operation ************************
|
---|
659 | # ********************************************************
|
---|
660 |
|
---|
661 | SET(FACT++LIBS StateMachine Configuration DimExtension)
|
---|
662 |
|
---|
663 | # --------------------------------------------------------
|
---|
664 |
|
---|
665 | ADD_EXECUTABLE(dns src/dns.c)
|
---|
666 | TARGET_LINK_LIBRARIES(dns ${FACT++LIBS})
|
---|
667 | MANPAGE(dns "")
|
---|
668 |
|
---|
669 | ADD_EXECUTABLE(agilentctrl src/agilentctrl.cc)
|
---|
670 | TARGET_LINK_LIBRARIES(agilentctrl ${FACT++LIBS})
|
---|
671 | MANPAGE(agilentctrl "")
|
---|
672 |
|
---|
673 | ADD_EXECUTABLE(biasctrl src/biasctrl.cc)
|
---|
674 | TARGET_LINK_LIBRARIES(biasctrl ${FACT++LIBS})
|
---|
675 | MANPAGE(biasctrl "")
|
---|
676 |
|
---|
677 | ADD_EXECUTABLE(biastemp src/biastemp.cc)
|
---|
678 | TARGET_LINK_LIBRARIES(biastemp ${FACT++LIBS})
|
---|
679 | MANPAGE(biastemp "")
|
---|
680 |
|
---|
681 | ADD_EXECUTABLE(gtcdust src/gtcdust.cc)
|
---|
682 | TARGET_LINK_LIBRARIES(gtcdust ${FACT++LIBS})
|
---|
683 | MANPAGE(gtcdust "")
|
---|
684 |
|
---|
685 | ADD_EXECUTABLE(chatserv src/chatserv.cc)
|
---|
686 | TARGET_LINK_LIBRARIES(chatserv ${FACT++LIBS}) # does not require libpanel
|
---|
687 | MANPAGE(chatserv "")
|
---|
688 |
|
---|
689 | ADD_EXECUTABLE(chatclient src/chatclient.cc)
|
---|
690 | TARGET_LINK_LIBRARIES(chatclient ${FACT++LIBS}) # does not require libpanel
|
---|
691 | MANPAGE(chatclient "")
|
---|
692 |
|
---|
693 | #ADD_EXECUTABLE(cosyctrl src/cosyctrl.cc)# src/LocalControl.h
|
---|
694 | #TARGET_LINK_LIBRARIES(cosyctrl
|
---|
695 | # StateMachine Tools Configuration Time Dim++ Dim DimExtension
|
---|
696 | # ${Boost_LIBRARIES} readline ${CURSES_LIBRARIES})
|
---|
697 |
|
---|
698 | ADD_EXECUTABLE(datalogger src/datalogger.cc
|
---|
699 | src/DimState.cc
|
---|
700 | src/FitsFile.cc src/Fits.cc)
|
---|
701 | TARGET_LINK_LIBRARIES(datalogger ${FACT++LIBS} cfitsio CCfits)
|
---|
702 | MANPAGE(datalogger "")
|
---|
703 |
|
---|
704 | ADD_EXECUTABLE(dimctrl src/dimctrl.cc
|
---|
705 | src/StateMachineDimControl.cc
|
---|
706 | src/RemoteControl.cc
|
---|
707 | src/InterpreterV8.cc
|
---|
708 | src/DimState.cc)
|
---|
709 | TARGET_LINK_LIBRARIES(dimctrl ${FACT++LIBS} Pointing ZLIB::ZLIB v8)
|
---|
710 | MANPAGE(dimctrl "")
|
---|
711 |
|
---|
712 | ADD_CUSTOM_TARGET(dimserver ALL
|
---|
713 | COMMAND ln -sf dimctrl dimserver
|
---|
714 | COMMENT "Creating symlink for dimserver"
|
---|
715 | DEPENDS dimctrl)
|
---|
716 |
|
---|
717 | ADD_EXECUTABLE(drivectrl src/drivectrl.cc)
|
---|
718 | TARGET_LINK_LIBRARIES(drivectrl ${FACT++LIBS} Pointing)
|
---|
719 | MANPAGE(drivectrl "")
|
---|
720 |
|
---|
721 | ADD_EXECUTABLE(evtserver src/evtserver.cc)
|
---|
722 | TARGET_LINK_LIBRARIES(evtserver ${FACT++LIBS} ZLIB::ZLIB)
|
---|
723 | MANPAGE(evtserver "")
|
---|
724 |
|
---|
725 | ADD_EXECUTABLE(fadctrl src/fadctrl.cc src/HeadersFAD.cc
|
---|
726 | src/EventBuilder.cc
|
---|
727 | src/FitsFile.cc
|
---|
728 | src/DataCalib.cc
|
---|
729 | src/DataWriteRaw.cc
|
---|
730 | src/DataWriteFits.cc
|
---|
731 | src/DataWriteFits2.cc
|
---|
732 | src/DataProcessorImp.cc)
|
---|
733 | TARGET_LINK_LIBRARIES(fadctrl ${FACT++LIBS} cfitsio CCfits ZLIB::ZLIB)
|
---|
734 | MANPAGE(fadctrl "")
|
---|
735 |
|
---|
736 | ADD_EXECUTABLE(feedback src/feedback.cc)
|
---|
737 | TARGET_LINK_LIBRARIES(feedback ${FACT++LIBS})
|
---|
738 | MANPAGE(feedback "")
|
---|
739 |
|
---|
740 | ADD_EXECUTABLE(fscctrl src/fscctrl.cc src/HeadersFTM.cc)
|
---|
741 | TARGET_LINK_LIBRARIES(fscctrl ${FACT++LIBS})
|
---|
742 | MANPAGE(fscctrl "")
|
---|
743 |
|
---|
744 | ADD_EXECUTABLE(ftmctrl src/ftmctrl.cc src/HeadersFTM.cc)
|
---|
745 | TARGET_LINK_LIBRARIES(ftmctrl ${FACT++LIBS})
|
---|
746 | MANPAGE(ftmctrl "")
|
---|
747 |
|
---|
748 | ADD_EXECUTABLE(gcn src/gcn.cc)
|
---|
749 | TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} Qt4::QtXml)
|
---|
750 | MANPAGE(gcn "")
|
---|
751 |
|
---|
752 | ADD_EXECUTABLE(scheduler src/scheduler.cc)
|
---|
753 | TARGET_LINK_LIBRARIES(scheduler ${FACT++LIBS})
|
---|
754 | MANPAGE(scheduler "")
|
---|
755 |
|
---|
756 | ADD_EXECUTABLE(gpsctrl src/gpsctrl.cc)
|
---|
757 | TARGET_LINK_LIBRARIES(gpsctrl ${FACT++LIBS})
|
---|
758 | MANPAGE(gpsctrl "")
|
---|
759 |
|
---|
760 | ADD_EXECUTABLE(lidctrl src/lidctrl.cc)
|
---|
761 | TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS} Qt4::QtXml)
|
---|
762 | MANPAGE(lidctrl "")
|
---|
763 |
|
---|
764 | ADD_EXECUTABLE(magiclidar src/magiclidar.cc)
|
---|
765 | TARGET_LINK_LIBRARIES(magiclidar ${FACT++LIBS})
|
---|
766 | MANPAGE(magiclidar "")
|
---|
767 |
|
---|
768 | ADD_EXECUTABLE(magicweather src/magicweather.cc)
|
---|
769 | TARGET_LINK_LIBRARIES(magicweather ${FACT++LIBS})
|
---|
770 | MANPAGE(magicweather "")
|
---|
771 |
|
---|
772 | ADD_EXECUTABLE(mcp src/mcp.cc)
|
---|
773 | TARGET_LINK_LIBRARIES(mcp ${FACT++LIBS})
|
---|
774 | MANPAGE(mcp "")
|
---|
775 |
|
---|
776 | ADD_EXECUTABLE(pfminictrl src/pfminictrl.cc)
|
---|
777 | TARGET_LINK_LIBRARIES(pfminictrl ${FACT++LIBS})
|
---|
778 | MANPAGE(pfminictrl "")
|
---|
779 |
|
---|
780 | ADD_EXECUTABLE(pwrctrl src/pwrctrl.cc src/HeadersPower.cc)
|
---|
781 | TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} Qt4::QtXml)
|
---|
782 | MANPAGE(pwrctrl "")
|
---|
783 |
|
---|
784 | ADD_EXECUTABLE(rainsensor src/rainsensor.cc)
|
---|
785 | TARGET_LINK_LIBRARIES(rainsensor ${FACT++LIBS})
|
---|
786 | MANPAGE(rainsensor "")
|
---|
787 |
|
---|
788 | ADD_EXECUTABLE(ratecontrol src/ratecontrol.cc)
|
---|
789 | TARGET_LINK_LIBRARIES(ratecontrol ${FACT++LIBS})
|
---|
790 | MANPAGE(ratecontrol "")
|
---|
791 |
|
---|
792 | ADD_EXECUTABLE(ratescan src/ratescan.cc)
|
---|
793 | TARGET_LINK_LIBRARIES(ratescan ${FACT++LIBS})
|
---|
794 | MANPAGE(ratescan "")
|
---|
795 |
|
---|
796 | #ADD_EXECUTABLE(scheduler src/scheduler.cc)
|
---|
797 | #TARGET_LINK_LIBRARIES(scheduler ${FACT++LIBS})
|
---|
798 | #MANPAGE(scheduler "")
|
---|
799 |
|
---|
800 | #ADD_EXECUTABLE(skypeclient src/skypeclient.cc)
|
---|
801 | #TARGET_LINK_LIBRARIES(skypeclient ${FACT++LIBS})
|
---|
802 | #MANPAGE(skypeclient "")
|
---|
803 |
|
---|
804 | ADD_EXECUTABLE(sqmctrl src/sqmctrl.cc)
|
---|
805 | TARGET_LINK_LIBRARIES(sqmctrl ${FACT++LIBS})
|
---|
806 | MANPAGE(sqmctrl "")
|
---|
807 |
|
---|
808 | ADD_EXECUTABLE(smartfact src/smartfact.cc)
|
---|
809 | TARGET_LINK_LIBRARIES(smartfact ${FACT++LIBS}) # HAVE_NOVA
|
---|
810 | MANPAGE(smartfact "")
|
---|
811 |
|
---|
812 | ADD_EXECUTABLE(temperature src/temperature.cc)
|
---|
813 | TARGET_LINK_LIBRARIES(temperature ${FACT++LIBS})
|
---|
814 | MANPAGE(temperature "")
|
---|
815 |
|
---|
816 | ADD_EXECUTABLE(timecheck src/timecheck.cc)
|
---|
817 | TARGET_LINK_LIBRARIES(timecheck ${FACT++LIBS})
|
---|
818 | MANPAGE(timecheck "")
|
---|
819 |
|
---|
820 | ADD_EXECUTABLE(tngweather src/tngweather.cc)
|
---|
821 | TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} Qt4::QtXml)
|
---|
822 | MANPAGE(tngweather "")
|
---|
823 |
|
---|
824 | #ADD_EXECUTABLE(triggerschedule src/triggerschedule.cc)
|
---|
825 | #TARGET_LINK_LIBRARIES(triggerschedule ${FACT++LIBS})
|
---|
826 | #MANPAGE(triggerschedule "")
|
---|
827 |
|
---|
828 | ENDIF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY)
|
---|
829 |
|
---|
830 | # ********************************************************
|
---|
831 | # ****************** GUI Applications ********************
|
---|
832 | # ********************************************************
|
---|
833 |
|
---|
834 | IF (NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
835 |
|
---|
836 | INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR}/qwt-qt4 gui gui/RawEventsViewer)
|
---|
837 |
|
---|
838 | # --------------------------------------------------------
|
---|
839 |
|
---|
840 | QT4_WRAP_UI(VIEWER_QT_HEADERS gui/RawEventsViewer/viewer.ui)
|
---|
841 |
|
---|
842 | QT4_WRAP_CPP(VIEWER_QT_SOURCES
|
---|
843 | gui/RawEventsViewer/RawEventsViewer.h
|
---|
844 | gui/BasicGlCamera.h
|
---|
845 | gui/QCameraWidget.h
|
---|
846 | gui/Q3DCameraWidget.h)
|
---|
847 |
|
---|
848 | ADD_EXECUTABLE(viewer
|
---|
849 | gui/RawEventsViewer/RawEventsViewer.cc
|
---|
850 | gui/BasicGlCamera.cc
|
---|
851 | gui/QCameraWidget.cc
|
---|
852 | gui/Q3DCameraWidget.cc
|
---|
853 | ${VIEWER_QT_HEADERS}
|
---|
854 | ${VIEWER_QT_SOURCES})
|
---|
855 |
|
---|
856 | TARGET_LINK_LIBRARIES(viewer
|
---|
857 | ${Boost_LIBRARIES} Configuration
|
---|
858 | Qt4::QtGui Qt4::QtOpenGL
|
---|
859 | ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU
|
---|
860 | qwt-qt4 ZLIB::ZLIB)
|
---|
861 |
|
---|
862 | ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY)
|
---|
863 |
|
---|
864 | # --------------------------------------------------------
|
---|
865 |
|
---|
866 | IF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND ROOT_GQt_FOUND)
|
---|
867 |
|
---|
868 | QT4_ADD_RESOURCES(FACT_QT_RESOURCES gui/design.qrc)
|
---|
869 |
|
---|
870 | QT4_WRAP_UI(FACT_QT_HEADERS gui/design.ui)
|
---|
871 |
|
---|
872 | QT4_WRAP_CPP(FACT_QT_SOURCES
|
---|
873 | gui/DockWindow.h
|
---|
874 | gui/MainWindow.h
|
---|
875 | gui/QCameraWidget.h
|
---|
876 | gui/BasicGlCamera.h)
|
---|
877 |
|
---|
878 | ADD_EXECUTABLE(fact gui/fact.cc
|
---|
879 | gui/DockWindow.cc
|
---|
880 | gui/MainWindow.cc
|
---|
881 | gui/QCameraWidget.cc
|
---|
882 | gui/BasicGlCamera.cc
|
---|
883 | gui/HtmlDelegate.cc
|
---|
884 | gui/CheckBoxDelegate.cc
|
---|
885 | src/DimNetwork.cc
|
---|
886 | ${FACT_QT_HEADERS}
|
---|
887 | ${FACT_QT_SOURCES}
|
---|
888 | ${FACT_QT_RESOURCES})
|
---|
889 |
|
---|
890 | TARGET_LINK_LIBRARIES(fact
|
---|
891 | ${FACT++LIBS}
|
---|
892 | ${ROOT_LIBRARIES}
|
---|
893 | Qt4::QtGui Qt4::QtOpenGL Qt4::QtSql
|
---|
894 | ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU
|
---|
895 | qwt-qt4 ZLIB::ZLIB)
|
---|
896 |
|
---|
897 |
|
---|
898 | #dclient5_SOURCES = src/dclient5.cc src/LocalControl.h
|
---|
899 | #dclient5_LDADD = libDim++.la libDim.la libStateMachine.la libTime.la libTools.la \
|
---|
900 | # libConfiguration.la
|
---|
901 |
|
---|
902 | #argv_SOURCES = src/argv.cc
|
---|
903 | #argv_LDADD = libConfiguration.la
|
---|
904 |
|
---|
905 | #time_SOURCES = src/time.cc
|
---|
906 | #time_LDADD = libTime.la
|
---|
907 |
|
---|
908 | #test_SOURCES = src/test.cc
|
---|
909 | #test_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la
|
---|
910 |
|
---|
911 | ENDIF(NOT TOOLS_ONLY AND NOT VIEWER_ONLY AND ROOT_GQt_FOUND)
|
---|
912 |
|
---|
913 |
|
---|
914 | # ********************************************************
|
---|
915 | # ********************** FAMOUS **************************
|
---|
916 | # ********************************************************
|
---|
917 |
|
---|
918 | IF(FOUND_FAMOUS)
|
---|
919 | INCLUDE_DIRECTORIES(famous/ui)
|
---|
920 | INCLUDE_DIRECTORIES(famous/src)
|
---|
921 |
|
---|
922 | ADD_EXECUTABLE(famousbias famous/src/famousbias.cc)
|
---|
923 | TARGET_LINK_LIBRARIES(famousbias ${FACT++LIBS})
|
---|
924 | MANPAGE(famousbias "")
|
---|
925 |
|
---|
926 | ADD_EXECUTABLE(famousui famous/ui/famousui.cc)
|
---|
927 | TARGET_LINK_LIBRARIES(famousui ${FACT++LIBS})
|
---|
928 | MANPAGE(famousui "")
|
---|
929 |
|
---|
930 | ADD_EXECUTABLE(ftuctrl famous/src/ftuctrl.cc)
|
---|
931 | TARGET_LINK_LIBRARIES(ftuctrl ${FACT++LIBS})
|
---|
932 | MANPAGE(ftuctrl "")
|
---|
933 |
|
---|
934 | ADD_EXECUTABLE(miniftmctrl famous/src/miniftmctrl.cc)
|
---|
935 | TARGET_LINK_LIBRARIES(miniftmctrl ${FACT++LIBS})
|
---|
936 | MANPAGE(miniftmctrl "")
|
---|
937 |
|
---|
938 | ADD_EXECUTABLE(fpgaftmctrl famous/src/fpgaftmctrl.cc)
|
---|
939 | TARGET_LINK_LIBRARIES(fpgaftmctrl ${FACT++LIBS})
|
---|
940 | MANPAGE(fpgaftmctrl "")
|
---|
941 |
|
---|
942 | ADD_EXECUTABLE(famousrate famous/src/famousrate.cc)
|
---|
943 | TARGET_LINK_LIBRARIES(famousrate ${FACT++LIBS})
|
---|
944 | MANPAGE(famousrate "")
|
---|
945 |
|
---|
946 | ADD_EXECUTABLE(famousscan famous/src/famousscan.cc)
|
---|
947 | TARGET_LINK_LIBRARIES(famousscan ${FACT++LIBS})
|
---|
948 | MANPAGE(famousscan "")
|
---|
949 |
|
---|
950 | ADD_EXECUTABLE(beaglectrl famous/src/beaglectrl.cc)
|
---|
951 | TARGET_LINK_LIBRARIES(beaglectrl ${FACT++LIBS} Qt4::QtXml)
|
---|
952 | MANPAGE(beaglectrl "")
|
---|
953 | ENDIF()
|
---|
954 |
|
---|
955 |
|
---|
956 |
|
---|
957 | # ********************************************************
|
---|
958 | # ********************** IceACT **************************
|
---|
959 | # ********************************************************
|
---|
960 |
|
---|
961 | IF(FOUND_ICEACT)
|
---|
962 | ADD_EXECUTABLE(iceactpsu iceact/src/psuctrl.cc)
|
---|
963 | TARGET_LINK_LIBRARIES(iceactpsu ${FACT++LIBS})
|
---|
964 | MANPAGE(iceactpsu "")
|
---|
965 |
|
---|
966 | ADD_EXECUTABLE(tmonctrl iceact/src/tmonctrl.cc)
|
---|
967 | TARGET_LINK_LIBRARIES(tmonctrl ${FACT++LIBS})
|
---|
968 | MANPAGE(tmonctrl "")
|
---|
969 | ENDIF()
|
---|
970 |
|
---|
971 |
|
---|
972 | # *********************************
|
---|
973 | # ********** Installation *********
|
---|
974 | # *********************************
|
---|
975 |
|
---|
976 | # ======== Setup directories ======
|
---|
977 |
|
---|
978 | # MESSAGE("")
|
---|
979 | # MESSAGE("PREFIX: "${CMAKE_INSTALL_PREFIX})
|
---|
980 | # MESSAGE("")
|
---|
981 | # MESSAGE("BINDIR: "${CMAKE_INSTALL_FULL_BINDIR})
|
---|
982 | # MESSAGE("SBINDIR: "${CMAKE_INSTALL_FULL_SBINDIR})
|
---|
983 | # MESSAGE("LIBEXECDIR: "${CMAKE_INSTALL_FULL_LIBEXECDIR})
|
---|
984 | # MESSAGE("SHAREDSTATEDIR: "${CMAKE_INSTALL_FULL_SHAREDSTATEDIR})
|
---|
985 | # MESSAGE("LOCALSTATEDIR: "${CMAKE_INSTALL_FULL_LOCALSTATEDIR})
|
---|
986 | # MESSAGE("RUNSTATEDIR: "${CMAKE_INSTALL_FULL_RUNSTATEDIR})
|
---|
987 | # MESSAGE("LIBDIR: "${CMAKE_INSTALL_FULL_LIBDIR})
|
---|
988 | # MESSAGE("INCLUDEDIR: "${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
---|
989 | # MESSAGE("DATAROOTDIR: "${CMAKE_INSTALL_FULL_DATAROOTDIR})
|
---|
990 | # MESSAGE("DATADIR: "${CMAKE_INSTALL_FULL_DATADIR})
|
---|
991 | # MESSAGE("INFODIR: "${CMAKE_INSTALL_FULL_INFODIR})
|
---|
992 | # MESSAGE("LOCALDIR: "${CMAKE_INSTALL_FULL_LOCALDIR})
|
---|
993 | # MESSAGE("MANDIR: "${CMAKE_INSTALL_FULL_MANDIR})
|
---|
994 | # MESSAGE("DOCDIR: "${CMAKE_INSTALL_FULL_DOCDIR})
|
---|
995 | # MESSAGE("")
|
---|
996 | # MESSAGE("BINDIR: "${CMAKE_INSTALL_BINDIR})
|
---|
997 | # MESSAGE("SBINDIR: "${CMAKE_INSTALL_SBINDIR})
|
---|
998 | # MESSAGE("LIBEXECDIR: "${CMAKE_INSTALL_LIBEXECDIR})
|
---|
999 | # MESSAGE("SHAREDSTATEDIR: "${CMAKE_INSTALL_SHAREDSTATEDIR})
|
---|
1000 | # MESSAGE("LOCALSTATEDIR: "${CMAKE_INSTALL_LOCALSTATEDIR})
|
---|
1001 | # MESSAGE("RUNSTATEDIR: "${CMAKE_INSTALL_RUNSTATEDIR})
|
---|
1002 | # MESSAGE("LIBDIR: "${CMAKE_INSTALL_LIBDIR})
|
---|
1003 | # MESSAGE("INCLUDEDIR: "${CMAKE_INSTALL_INCLUDEDIR})
|
---|
1004 | # MESSAGE("DATAROOTDIR: "${CMAKE_INSTALL_DATAROOTDIR})
|
---|
1005 | # MESSAGE("DATADIR: "${CMAKE_INSTALL_DATADIR})
|
---|
1006 | # MESSAGE("INFODIR: "${CMAKE_INSTALL_INFODIR})
|
---|
1007 | # MESSAGE("LOCALDIR: "${CMAKE_INSTALL_LOCALDIR})
|
---|
1008 | # MESSAGE("MANDIR: "${CMAKE_INSTALL_MANDIR})
|
---|
1009 | # MESSAGE("DOCDIR: "${CMAKE_INSTALL_DOCDIR})
|
---|
1010 | # MESSAGE("")
|
---|
1011 |
|
---|
1012 | SET(PKG_SHARE "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}")
|
---|
1013 | SET(PKG_APPS "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
---|
1014 | SET(PKG_PIXMAPS "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps")
|
---|
1015 |
|
---|
1016 | # ====== Installation targets =====
|
---|
1017 |
|
---|
1018 | IF (NOT VIEWER_ONLY)
|
---|
1019 | INSTALL(TARGETS fits2sql DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1020 | INSTALL(TARGETS root2sql DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1021 | INSTALL(TARGETS root2csv DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1022 | INSTALL(TARGETS csv2root DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1023 | INSTALL(TARGETS fitsdump DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1024 | INSTALL(TARGETS zfits DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1025 | INSTALL(TARGETS calcsource DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1026 | INSTALL(TARGETS showlog DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1027 | INSTALL(TARGETS rootifysql DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
---|
1028 | ENDIF(NOT VIEWER_ONLY)
|
---|
1029 |
|
---|
1030 | INSTALL(TARGETS Configuration DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
---|
1031 | INSTALL(TARGETS Time DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
---|
1032 | INSTALL(TARGETS Tools DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
---|
1033 |
|
---|
1034 |
|
---|
1035 | #INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/html DESTINATION "${PKG_SHARE}" FILES_MATCHING PATTERN "*.html")
|
---|
1036 | #INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/pdf DESTINATION "${PKG_SHARE}" FILES_MATCHING PATTERN "*.pdf")
|
---|
1037 |
|
---|
1038 | # *********************************
|
---|
1039 | # ************ Packaging **********
|
---|
1040 | # *********************************
|
---|
1041 |
|
---|
1042 | # ======== General packaging ======
|
---|
1043 | # https://cmake.org/cmake/help/latest/module/CPack.html
|
---|
1044 |
|
---|
1045 | INCLUDE(InstallRequiredSystemLibraries)
|
---|
1046 |
|
---|
1047 | # SET(CPACK_STRIP_FILES ON) # Strip debug sysmbold from files
|
---|
1048 |
|
---|
1049 | SET(CPACK_PACKAGE_VERSION "${fact++_VERSION}")
|
---|
1050 | SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
|
---|
1051 | SET(CPACK_PACKAGE_MAINTAINER "${PACKAGE_MAINTAINER}")
|
---|
1052 | SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
---|
1053 | #SET(CPACK_PACKAGE_VENDOR "Me, myself, and I")
|
---|
1054 |
|
---|
1055 |
|
---|
1056 | SET(CPACK_SOURCE_IGNORE_FILES "/old/;/build/;/[.].*/;/autom4te[.]cache/;.*~;.log$")
|
---|
1057 |
|
---|
1058 | # Maybe the text displayed in synaptic?
|
---|
1059 | SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
|
---|
1060 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FACT++ - Toolset")
|
---|
1061 | #CPACK_RESOURCE_FILE_README ReadMe file to be embedded in the installer.
|
---|
1062 |
|
---|
1063 | SET(CPACK_GENERATOR TBZ2 DEB) # TGZ
|
---|
1064 | SET(CPACK_SOURCE_GENERATOR TBZ2) # TGZ
|
---|
1065 | #SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/cmake/Package.txt)
|
---|
1066 | #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
---|
1067 |
|
---|
1068 |
|
---|
1069 | # ======== Debian packaging =======
|
---|
1070 | # https://cmake.org/cmake/help/latest/module/CPackDeb.html
|
---|
1071 | # https://www.debian.org/doc/debian-policy
|
---|
1072 |
|
---|
1073 | #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)")
|
---|
1074 | SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS 1) # generate better (atomatic?) dependecies
|
---|
1075 | SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
|
---|
1076 | SET(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
|
---|
1077 | SET(CPACK_DEBIAN_PACKAGE_SECTION utils)
|
---|
1078 | SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PACKAGE_URL}")
|
---|
1079 | SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION
|
---|
1080 | "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
|
---|
1081 | This package contains some tools which are part of FACT++ to deal with databases, fits files and root-files.")
|
---|
1082 | #indent the long description with spaces
|
---|
1083 |
|
---|
1084 | #CPACK_INSTALL_CMAKE_PROJECTS
|
---|
1085 | #List of four values that specify what project to install. Build directory, Project Name, Project Component, Directory.
|
---|
1086 |
|
---|
1087 | INCLUDE(CPack)
|
---|