Changeset 19141 for trunk/FACT++
- Timestamp:
- 08/05/18 12:49:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/CMakeLists.txt
r19099 r19141 50 50 51 51 52 53 52 # ********************************* 54 53 # ******** FAMOUS / IceACT ******** 55 54 # ********************************* 55 56 IF (NOT TOOLS_ONLY) 56 57 57 58 IF(EXISTS "${CMAKE_SOURCE_DIR}/famous") … … 65 66 ENDIF() 66 67 68 ENDIF(NOT TOOLS_ONLY) 67 69 68 70 … … 78 80 # ========== executables ========== 79 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 80 89 FIND_PROGRAM(JSDOC_EXECUTABLE jsdoc) 81 90 FIND_PROGRAM(MAILX_EXECUTABLE mailx) 82 91 FIND_PROGRAM(CURL_EXECUTABLE curl) 83 FIND_PROGRAM(GROFF_EXECUTABLE groff) 84 85 FIND_PACKAGE_HANDLE_STANDARD_ARGS(groff DEFAULT_MSG GROFF_EXECUTABLE) 92 86 93 FIND_PACKAGE_HANDLE_STANDARD_ARGS(curl DEFAULT_MSG CURL_EXECUTABLE) 87 94 FIND_PACKAGE_HANDLE_STANDARD_ARGS(mailx DEFAULT_MSG MAILX_EXECUTABLE) 88 95 FIND_PACKAGE_HANDLE_STANDARD_ARGS(jsdoc DEFAULT_MSG JSDOC_EXECUTABLE) 89 FIND_PACKAGE_HANDLE_STANDARD_ARGS(help2man DEFAULT_MSG HELP2MAN_EXECUTABLE) 96 97 ENDIF (NOT TOOLS_ONLY) 90 98 91 99 #IF(NOT SOME_COND) … … 101 109 FIND_PACKAGE(Threads REQUIRED) # Threads::Threads 102 110 FIND_PACKAGE(ZLIB REQUIRED) # ZLIB::ZLIB 103 FIND_PACKAGE(OpenGL REQUIRED) # OpenGL::GL OpenGL::GLU / OPENGL_FOUND OPENGL_GLU_FOUND104 111 105 112 SET(CURSES_NEED_NCURSES ON) … … 107 114 # FIXME : Require panel 108 115 116 IF(NOT TOOLS_ONLY) 117 118 FIND_PACKAGE(OpenGL REQUIRED) # OpenGL::GL OpenGL::GLU / OPENGL_FOUND OPENGL_GLU_FOUND 119 109 120 # FIND_PACKAGE(DBus) => skaypeclient 110 121 # FIND_PACKAGE(Motif) => did # MOTIF_FOUND 122 111 123 FIND_PACKAGE(Readline REQUIRED) 112 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 113 131 FIND_PACKAGE(Nova REQUIRED) 114 132 FIND_PACKAGE(MySQL REQUIRED) 115 133 FIND_PACKAGE(MySQL++ REQUIRED) 116 FIND_PACKAGE(V8 REQUIRED)117 FIND_PACKAGE(Cfitsio REQUIRED)118 FIND_PACKAGE(CCfits REQUIRED)119 134 FIND_PACKAGE(OpenSSL REQUIRED) # Required for boost::asio::ssl 120 135 … … 150 165 151 166 # =============== QT4 ============== 167 IF(NOT TOOLS_ONLY) 168 152 169 SET(CMAKE_INCLUDE_CURRENT_DIR ON) 153 170 FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtXml) 154 171 FIND_PACKAGE(Qwt REQUIRED) 172 173 ENDIF(NOT TOOLS_ONLY) 155 174 156 175 # =========== Enable C++11 =========== … … 236 255 # ********************** Libraries *********************** 237 256 # ******************************************************** 257 IF (NOT TOOLS_ONLY) 238 258 239 259 # =================== libPointing.so ====================== … … 354 374 TARGET_LINK_LIBRARIES(StateMachine OpenSSL::SSL) 355 375 376 ENDIF (NOT TOOLS_ONLY) 377 356 378 # ================= libConfiguration.so ================== 357 379 ADD_LIBRARY(Configuration SHARED … … 410 432 ADD_CUSTOM_TARGET(${program}.man ALL DEPENDS man1/${program}.1) 411 433 412 # INSTALL(FILES ${PROJECT_BINARY_DIR}/${program}.1 DESTINATION "${PKG_MAN}")434 INSTALL(FILES ${PROJECT_BINARY_DIR}/man1/${program}.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") 413 435 414 436 ENDMACRO() … … 427 449 ADD_EXECUTABLE(fitsdump src/fitsdump.cc) 428 450 TARGET_LINK_LIBRARIES(fitsdump ${HELP++LIBS} ${ROOT_LIBRARIES} ZLIB::ZLIB) 429 MANPAGE(fitsdump " ")451 MANPAGE(fitsdump "FACT++ - fitsdump - Read and dump contents of a FITStable") 430 452 431 453 #ADD_EXECUTABLE(fitsloader src/fitsloader.cc) … … 445 467 #MANPAGE(fitsselect "") 446 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 447 495 ADD_EXECUTABLE(getevent src/getevent.cc) 448 496 TARGET_LINK_LIBRARIES(getevent ${HELP++LIBS} ZLIB::ZLIB) 449 497 MANPAGE(getevent "") 450 498 451 #ADD_EXECUTABLE(readfits src/readfits.cc)452 #TARGET_LINK_LIBRARIES(readfits ${HELP++LIBS} ZLIB::ZLIB)453 #MANPAGE(readfits "")454 455 ADD_EXECUTABLE(rootifysql src/rootifysql.cc)456 TARGET_LINK_LIBRARIES(rootifysql ${HELP++LIBS} ${ROOT_LIBRARIES})457 MANPAGE(rootifysql "")458 459 ADD_EXECUTABLE(root2sql src/root2sql.cc)460 TARGET_LINK_LIBRARIES(root2sql ${HELP++LIBS} ${ROOT_LIBRARIES})461 MANPAGE(root2sql "")462 463 ADD_EXECUTABLE(fits2sql src/fits2sql.cc)464 TARGET_LINK_LIBRARIES(fits2sql ${HELP++LIBS} ZLIB::ZLIB)465 MANPAGE(fits2sql "")466 467 499 ADD_EXECUTABLE(calcsource src/calcsource.cc) 468 500 TARGET_LINK_LIBRARIES(calcsource ${HELP++LIBS} ${ROOT_LIBRARIES} ${NOVA_LIBRARY}) … … 480 512 TARGET_LINK_LIBRARIES(makeschedule ${HELP++LIBS} ${NOVA_LIBRARY}) 481 513 MANPAGE(makeschedule "") 482 483 ADD_EXECUTABLE(showlog src/showlog.cc src/WindowLog.cc)484 TARGET_LINK_LIBRARIES(showlog Threads::Threads ${HELP++LIBS} ${CURSES_LIBRARIES})485 MANPAGE(showlog "")486 487 ADD_EXECUTABLE(zfits src/zfits.cc)488 TARGET_LINK_LIBRARIES(zfits ${HELP++LIBS} ZLIB::ZLIB)489 MANPAGE(zfits "")490 491 492 514 493 515 # ******************************************************** … … 735 757 #test_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la 736 758 737 759 ENDIF(NOT TOOLS_ONLY) 738 760 739 761 … … 787 809 ENDIF() 788 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)
Note:
See TracChangeset
for help on using the changeset viewer.