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