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