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