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