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