source: trunk/FACT++/CMakeLists.txt @ 19245

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