- Timestamp:
- 04/12/21 18:48:16 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/CMakeLists.txt
r20068 r20070 28 28 #SET(CMAKE_VERBOSE_MAKEFILE ON) 29 29 30 # ********************************* 31 # ************ System ************* 32 # ********************************* 33 34 FIND_PROGRAM(LSB_RELEASE_EXE NAMES lsb_release) 35 IF (DEFINED LSB_RELEASE_EXE) 36 EXECUTE_PROCESS(COMMAND ${LSB_RELEASE_EXE} -d OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) 37 MESSAGE(STATUS ${LSB_RELEASE}) 38 ENDIF() 39 30 40 MESSAGE(STATUS "CMake Version " ${CMAKE_VERSION}) 31 41 42 43 32 44 # ********************************* 33 45 # ************ Project ************ … … 40 52 PROJECT(fact++ VERSION ${VERSION}) 41 53 42 INCLUDE(GNUInstallDirs) 54 # ************************************* 55 # ************ Some checks *********** 56 # ************************************* 43 57 44 58 IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") … … 74 88 75 89 76 # ======== For config.h.in ========= 77 SET(PACKAGE_MAINTAINER "Thomas Bretz") 78 SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de") 79 SET(PACKAGE_URL "https://www.fact-project.org") 80 81 FIND_PROGRAM(LSB_RELEASE_EXE NAMES lsb_release) 82 IF (DEFINED LSB_RELEASE_EXE) 83 EXECUTE_PROCESS(COMMAND ${LSB_RELEASE_EXE} -d OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) 84 MESSAGE(STATUS ${LSB_RELEASE}) 85 ENDIF() 90 # ************************************* 91 # ************ Installation *********** 92 # ************************************* 93 94 INCLUDE(GNUInstallDirs) 95 IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR CMAKE_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX_DEFAULT) 96 MESSAGE(STATUS "Install Prefix: " ${CMAKE_INSTALL_PREFIX} " <default>") 97 SET(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_INSTALL_PREFIX} CACHE INTERNAL "Default install prefix") 98 ELSE() 99 MESSAGE(STATUS "Install Prefix: " ${CMAKE_INSTALL_PREFIX}) 100 ENDIF() 101 102 # Compiling and installation with full RAPTH 103 104 # Taken from 105 # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling 106 107 # use, i.e. don't skip the full RPATH for the build tree 108 SET(CMAKE_SKIP_BUILD_RPATH FALSE) 109 # when building, don't use the install RPATH already 110 # (but later on when installing) 111 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 112 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") 113 # add then automatically determined parts of the RPATH 114 # which point to directories outside the build tree to the install RPATH 115 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 116 # the RPATH to be used when installing, but only if it's not a system directory 117 #LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" IsSystemDir) 118 #IF("${IsSystemDir}" STREQUAL "-1") 119 # SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") 120 #ENDIF() 121 122 INSTALL(PROGRAMS start.sh DESTINATION ${CMAKE_INSTALL_BINDIR}) 123 124 # USAGE: 125 # INSTALL_LINK(executable) 126 # INSTALL_LINK(executable link) 127 FUNCTION(INSTALL_LINK) 128 129 IF (NOT CMAKE_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX_DEFAULT) 130 131 LIST(LENGTH ARGN LIST_COUNT) 132 IF (LIST_COUNT GREATER 2) 133 MESSAGE(FATAL_ERROR "LINK only suppted with a maximum of two arguments") 134 ENDIF() 135 136 LIST(GET ARGN 0 executable) 137 IF (LIST_COUNT EQUAL 1) 138 LIST(GET ARGN 0 link) 139 ELSE() 140 LIST(GET ARGN 1 link) 141 ENDIF() 142 143 INSTALL(CODE "MESSAGE(STATUS \"Creating symlink for ${executable}\")") 144 INSTALL(CODE "EXECUTE_PROCESS(COMMAND ln -sf bin/${link} ${executable} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})") 145 ENDIF() 146 147 ENDFUNCTION() 148 86 149 87 150 # ********************************* … … 436 499 # ********************************* 437 500 438 SET(CMAKE_CXX_STANDARD 11)501 #SET(CMAKE_CXX_STANDARD 11) 439 502 SET(CMAKE_C_STANDARD 99) 440 503 … … 469 532 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux") 470 533 534 535 # ======== For config.h.in ========= 536 SET(PACKAGE_MAINTAINER "Thomas Bretz") 537 SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de") 538 SET(PACKAGE_URL "https://www.fact-project.org") 539 540 541 # ******************************************************** 542 # ******************** Compilation *********************** 543 # ******************************************************** 471 544 472 545 # ------------------------------------------------------- … … 526 599 erfa/src/tr.c erfa/src/falp03.c) 527 600 TARGET_LINK_LIBRARIES(Pointing PUBLIC m) 601 INSTALL(TARGETS Pointing) 528 602 529 603 # ======================= libDim.so ====================== … … 549 623 dim/src/utilities.c) 550 624 625 INSTALL(TARGETS Dim) 626 551 627 # ================= libDimExtension.so =================== 552 628 ADD_LIBRARY(DimExtension SHARED … … 555 631 TARGET_LINK_LIBRARIES(DimExtension PUBLIC 556 632 Boost::system) 633 INSTALL(TARGETS DimExtension) 557 634 558 635 # ===================== libDim++.so ====================== … … 572 649 dim/src/tokenstring.cxx) 573 650 TARGET_LINK_LIBRARIES(Dim++ PUBLIC Dim) 651 INSTALL(TARGETS Dim++) 574 652 575 653 # ================= libStateMachine.so =================== … … 612 690 Boost::filesystem 613 691 OpenSSL::SSL) 692 INSTALL(TARGETS StateMachine) 614 693 615 694 ENDIF (NOT TOOLS_ONLY AND NOT VIEWER_ONLY) … … 625 704 Boost::program_options 626 705 ${MYSQL_LIBRARY} ${MYSQLPP_LIBRARY}) 706 INSTALL(TARGETS Configuration) 627 707 628 708 # ===================== libTime.so ======================= … … 630 710 src/Time.h src/Time.cc) 631 711 TARGET_LINK_LIBRARIES(Time PUBLIC ${NOVA_LIBRARY}) 712 INSTALL(TARGETS Time) 632 713 633 714 # ===================== libTools.so ====================== 634 715 ADD_LIBRARY(Tools SHARED 635 716 src/tools.h src/tools.cc) 717 INSTALL(TARGETS Tools) 636 718 637 719 … … 731 813 ADD_EXECUTABLE(fitsdump src/fitsdump.cc) 732 814 TARGET_LINK_LIBRARIES(fitsdump ${HELP++LIBS} ${ROOT_LIBRARIES} ZLIB::ZLIB) 815 INSTALL(TARGETS fitsdump) 816 INSTALL_LINK(fitsdump) 733 817 MANPAGE(fitsdump "FACT++ - fitsdump - Read and dump contents of a FITStable") 734 818 # This is a hack to suppress warnings from root headers (-isystem) … … 737 821 ADD_EXECUTABLE(rootifysql src/rootifysql.cc) 738 822 TARGET_LINK_LIBRARIES(rootifysql ${HELP++LIBS} OpenSSL::SSL ${ROOT_LIBRARIES}) 823 INSTALL(TARGETS rootifysql) 824 INSTALL_LINK(rootifysql) 739 825 MANPAGE(rootifysql "FACT++ - rootifysql - Write result of a SQL query into a root-file") 740 826 # This is a hack to suppress warnings from root headers (-isystem) … … 743 829 ADD_EXECUTABLE(root2sql src/root2sql.cc) 744 830 TARGET_LINK_LIBRARIES(root2sql ${HELP++LIBS} OpenSSL::SSL ${MYSQLPP_LIBRARY} ${ROOT_LIBRARIES}) 831 INSTALL(TARGETS root2sql) 832 INSTALL_LINK(root2sql) 745 833 MANPAGE(root2sql "FACT++ - root2sql - Fill contents of a root-tree into a MySQL database") 746 834 # This is a hack to suppress warnings from root headers (-isystem) … … 749 837 ADD_EXECUTABLE(root2csv src/root2csv.cc) 750 838 TARGET_LINK_LIBRARIES(root2csv ${HELP++LIBS} ${ROOT_LIBRARIES}) 839 INSTALL(TARGETS root2csv) 840 INSTALL_LINK(root2csv) 751 841 MANPAGE(root2csv "FACT++ - root2csv - Convert a root-tree to a csv file") 752 842 # This is a hack to suppress warnings from root headers (-isystem) … … 755 845 ADD_EXECUTABLE(csv2root src/csv2root.cc) 756 846 TARGET_LINK_LIBRARIES(csv2root ${HELP++LIBS} ${ROOT_LIBRARIES}) 847 INSTALL(TARGETS csv2root) 848 INSTALL_LINK(csv2root) 757 849 MANPAGE(csv2root "FACT++ - csv2root - Convert a csv file to a root-tree") 758 850 # This is a hack to suppress warnings from root headers (-isystem) … … 762 854 ADD_EXECUTABLE(fits2sql src/fits2sql.cc) 763 855 TARGET_LINK_LIBRARIES(fits2sql ${HELP++LIBS} ZLIB::ZLIB) 856 INSTALL(TARGETS fits2sql) 857 INSTALL_LINK(fits2sql) 764 858 MANPAGE(fits2sql "FACT++ - fits2sql - Fill contents of a FITS table into a MySQL database") 765 859 766 860 ADD_EXECUTABLE(corsika2sql src/corsika2sql.cc) 767 861 TARGET_LINK_LIBRARIES(corsika2sql ${HELP++LIBS}) 862 INSTALL(TARGETS corsika2sql) 863 INSTALL_LINK(corsika2sql) 768 864 MANPAGE(corsika2sql "Fills a Corsika Input Card into a SQL table") 769 865 770 866 ADD_EXECUTABLE(showlog src/showlog.cc src/WindowLog.cc) 771 867 TARGET_LINK_LIBRARIES(showlog Threads::Threads ${HELP++LIBS} ${CURSES_LIBRARIES}) 868 INSTALL(TARGETS showlog) 869 INSTALL_LINK(showlog) 772 870 MANPAGE(showlog "") 773 871 774 872 ADD_EXECUTABLE(zfits src/zfits.cc) 775 873 TARGET_LINK_LIBRARIES(zfits ${HELP++LIBS} ZLIB::ZLIB) 874 INSTALL(TARGETS zfits) 875 INSTALL_LINK(zfits) 776 876 MANPAGE(zfits "") 777 877 778 878 ADD_EXECUTABLE(fixfits src/fixfits.cc) 779 879 TARGET_LINK_LIBRARIES(fixfits ${HELP++LIBS} ZLIB::ZLIB) 880 INSTALL(TARGETS fixfits) 881 INSTALL_LINK(fixfits) 780 882 MANPAGE(fixfits "FACT++ - fixfits - Fix the header of a none closed raw-data file") 781 883 … … 783 885 ADD_EXECUTABLE(calcsource src/calcsource.cc) 784 886 TARGET_LINK_LIBRARIES(calcsource ${HELP++LIBS} ${ROOT_LIBRARIES}) 887 INSTALL(TARGETS calcsource) 888 INSTALL_LINK(calcsource) 785 889 MANPAGE(calcsource "") 786 890 # This is a hack to suppress warnings from root headers (-isystem) … … 789 893 ADD_EXECUTABLE(calcsourcemc src/calcsourcemc.cc) 790 894 TARGET_LINK_LIBRARIES(calcsourcemc ${HELP++LIBS} ${ROOT_LIBRARIES}) 895 INSTALL(TARGETS calcsourcemc) 896 INSTALL_LINK(calcsourcemc) 791 897 MANPAGE(calcsourcemc "") 792 898 # This is a hack to suppress warnings from root headers (-isystem) … … 797 903 TARGET_LINK_LIBRARIES(spectrum Threads::Threads ${CURSES_LIBRARIES} ${HIGHLIGHT_LIBRARY} ${HELP++LIBS} ${ROOT_LIBRARIES}) 798 904 ADD_RESOURCES(spectrum/analysis.sql spectrum/data.sql spectrum/simulation.sql spectrum/spectrum.sql spectrum/summary-est.sql spectrum/summary-sim.sql) 905 INSTALL(TARGETS spectrum) 906 INSTALL_LINK(spectrum) 907 INSTALL(FILES spectrum/analysis.sql spectrum/data.sql spectrum/simulation.sql spectrum/spectrum.sql spectrum/summary-est.sql spectrum/summary-sim.sql DESTINATION share/sql) 799 908 MANPAGE(spectrum "") 800 909 # This is a hack to suppress warnings from root headers (-isystem) … … 803 912 ADD_EXECUTABLE(getevent src/getevent.cc) 804 913 TARGET_LINK_LIBRARIES(getevent ${HELP++LIBS} ZLIB::ZLIB Threads::Threads) 914 INSTALL(TARGETS getevent) 915 INSTALL_LINK(getevent) 805 916 MANPAGE(getevent "") 806 917 … … 811 922 IF(NOT NO_ROOT) 812 923 ADD_EXECUTABLE(makeplots src/makeplots.cc) 813 TARGET_LINK_LIBRARIES(makeplots ${HELP++LIBS} ${ROOT_LIBRARIES}) 924 TARGET_LINK_LIBRARIES(makeplots ${HELP++LIBS} ${ROOT_LIBRARIES}) 925 INSTALL(TARGETS makeplots) 926 INSTALL_LINK(makeplots) 814 927 # This is a hack to suppress warnings from root headers (-isystem) 815 928 TARGET_INCLUDE_DIRECTORIES(makeplots SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS}) … … 819 932 ADD_EXECUTABLE(makedata src/makedata.cc) 820 933 TARGET_LINK_LIBRARIES(makedata ${HELP++LIBS}) 934 INSTALL(TARGETS makedata) 935 INSTALL_LINK(makedata) 821 936 MANPAGE(makedata "") 822 937 823 938 ADD_EXECUTABLE(makeschedule src/makeschedule.cc) 824 939 TARGET_LINK_LIBRARIES(makeschedule ${HELP++LIBS}) 940 INSTALL(TARGETS makeschedule) 941 INSTALL_LINK(makeschedule) 825 942 MANPAGE(makeschedule "") 826 943 827 944 ADD_EXECUTABLE(moon src/moon.cc) 828 945 TARGET_LINK_LIBRARIES(moon ${HELP++LIBS}) 946 INSTALL(TARGETS moon) 947 INSTALL_LINK(moon) 829 948 MANPAGE(moon "") 830 949 … … 839 958 ADD_EXECUTABLE(dns src/dns.c) 840 959 TARGET_LINK_LIBRARIES(dns ${FACT++LIBS}) 960 INSTALL(TARGETS dns) 961 INSTALL_LINK(dns) 841 962 MANPAGE(dns "") 842 963 843 964 ADD_EXECUTABLE(agilentctrl src/agilentctrl.cc) 844 965 TARGET_LINK_LIBRARIES(agilentctrl ${FACT++LIBS}) 966 INSTALL(TARGETS agilentctrl) 967 INSTALL_LINK(agilentctrl start.sh) 845 968 MANPAGE(agilentctrl "") 846 969 847 970 ADD_EXECUTABLE(biasctrl src/biasctrl.cc) 848 971 TARGET_LINK_LIBRARIES(biasctrl ${FACT++LIBS}) 972 INSTALL(TARGETS biasctrl) 973 INSTALL_LINK(biasctrl start.sh) 849 974 MANPAGE(biasctrl "") 850 975 851 976 ADD_EXECUTABLE(biastemp src/biastemp.cc) 852 977 TARGET_LINK_LIBRARIES(biastemp ${FACT++LIBS}) 978 INSTALL(TARGETS biastemp) 979 INSTALL_LINK(biastemp start.sh) 853 980 MANPAGE(biastemp "") 854 981 855 982 ADD_EXECUTABLE(gudectrl src/gudectrl.cc) 856 983 TARGET_LINK_LIBRARIES(gudectrl ${FACT++LIBS}) 984 INSTALL(TARGETS gudectrl) 985 INSTALL_LINK(gudectrl start.sh) 857 986 MANPAGE(gudectrl "") 858 987 859 988 ADD_EXECUTABLE(gtcdust src/gtcdust.cc) 860 989 TARGET_LINK_LIBRARIES(gtcdust ${FACT++LIBS}) 990 INSTALL(TARGETS gtcdust) 991 INSTALL_LINK(gtcdust start.sh) 861 992 MANPAGE(gtcdust "") 862 993 863 994 ADD_EXECUTABLE(chatserv src/chatserv.cc) 864 995 TARGET_LINK_LIBRARIES(chatserv ${FACT++LIBS}) # does not require libpanel 996 INSTALL(TARGETS chatserv) 997 INSTALL_LINK(chatserv start.sh) 865 998 MANPAGE(chatserv "") 866 999 867 1000 ADD_EXECUTABLE(chatclient src/chatclient.cc) 868 1001 TARGET_LINK_LIBRARIES(chatclient ${FACT++LIBS}) # does not require libpanel 1002 INSTALL(TARGETS chatclient) 1003 INSTALL_LINK(chatclient start.sh) 869 1004 MANPAGE(chatclient "") 870 1005 … … 878 1013 src/FitsFile.cc src/Fits.cc) 879 1014 TARGET_LINK_LIBRARIES(datalogger ${FACT++LIBS} cfitsio CCfits) 1015 INSTALL(TARGETS datalogger) 1016 INSTALL_LINK(datalogger start.sh) 880 1017 MANPAGE(datalogger "") 881 1018 … … 887 1024 src/DimState.cc) 888 1025 TARGET_LINK_LIBRARIES(dimctrl ${FACT++LIBS} Pointing ZLIB::ZLIB v8) 1026 INSTALL(TARGETS dimctrl) 1027 INSTALL_LINK(dimctrl start.sh) 889 1028 MANPAGE(dimctrl "") 890 1029 … … 893 1032 COMMENT "Creating symlink for dimserver" 894 1033 DEPENDS dimctrl) 1034 1035 INSTALL(FILES ${CMAKE_BINARY_DIR}/dimserver DESTINATION ${CMAKE_INSTALL_BINDIR}) 1036 INSTALL_LINK(dimserver start.sh) 895 1037 ENDIF() 896 1038 897 1039 ADD_EXECUTABLE(drivectrl src/drivectrl.cc) 898 1040 TARGET_LINK_LIBRARIES(drivectrl ${FACT++LIBS} Pointing) 1041 INSTALL(TARGETS drivectrl) 1042 INSTALL_LINK(drivectrl start.sh) 899 1043 MANPAGE(drivectrl "") 900 1044 901 1045 ADD_EXECUTABLE(evtserver src/evtserver.cc) 902 1046 TARGET_LINK_LIBRARIES(evtserver ${FACT++LIBS} ZLIB::ZLIB) 1047 INSTALL(TARGETS evtserver) 1048 INSTALL_LINK(evtserver start.sh) 903 1049 MANPAGE(evtserver "") 904 1050 … … 912 1058 src/DataProcessorImp.cc) 913 1059 TARGET_LINK_LIBRARIES(fadctrl ${FACT++LIBS} cfitsio CCfits ZLIB::ZLIB) 1060 INSTALL(TARGETS fadctrl) 1061 INSTALL_LINK(fadctrl start.sh) 914 1062 MANPAGE(fadctrl "") 915 1063 916 1064 ADD_EXECUTABLE(feedback src/feedback.cc) 917 1065 TARGET_LINK_LIBRARIES(feedback ${FACT++LIBS}) 1066 INSTALL(TARGETS feedback) 1067 INSTALL_LINK(feedback start.sh) 918 1068 MANPAGE(feedback "") 919 1069 920 1070 ADD_EXECUTABLE(fscctrl src/fscctrl.cc src/HeadersFTM.cc) 921 1071 TARGET_LINK_LIBRARIES(fscctrl ${FACT++LIBS}) 1072 INSTALL(TARGETS fscctrl) 1073 INSTALL_LINK(fscctrl start.sh) 922 1074 MANPAGE(fscctrl "") 923 1075 924 1076 ADD_EXECUTABLE(miniftmctrl src/miniftmctrl.cc) 925 1077 TARGET_LINK_LIBRARIES(miniftmctrl ${FACT++LIBS}) 1078 INSTALL(TARGETS miniftmctrl) 1079 INSTALL_LINK(miniftmctrl start.sh) 926 1080 MANPAGE(miniftmctrl "") 1081 1082 ADD_EXECUTABLE(fpgaftmctrl src/fpgaftmctrl.cc) 1083 TARGET_LINK_LIBRARIES(fpgaftmctrl ${FACT++LIBS}) 1084 INSTALL(TARGETS fpgaftmctrl) 1085 INSTALL_LINK(fpgaftmctrl start.sh) 1086 MANPAGE(fpgaftmctrl "") 927 1087 928 1088 IF(NOT FOUND_FAMOUS) 929 1089 ADD_EXECUTABLE(ftmctrl src/ftmctrl.cc src/HeadersFTM.cc) 930 1090 TARGET_LINK_LIBRARIES(ftmctrl ${FACT++LIBS}) 1091 INSTALL(TARGETS ftmctrl) 1092 INSTALL_LINK(ftmctrl start.sh) 931 1093 MANPAGE(ftmctrl "") 932 1094 ELSE() 933 1095 ADD_CUSTOM_TARGET(ftmctrl ALL 934 COMMAND ln -sf miniftmctrl ftmctrl 935 COMMENT "Creating symlink for ftmctrl" 936 DEPENDS miniftmctrl) 1096 COMMAND ln -sf fpgaftmctrl ftmctrl 1097 COMMENT "Creating symlink for fpgaftmctrl" 1098 DEPENDS fpgaftmctrl) 1099 INSTALL(FILES ${CMAKE_BINARY_DIR}/fpgaftmctrl DESTINATION ${CMAKE_INSTALL_BINDIR}) 1100 INSTALL_LINK(fpgaftmctrl start.sh) 937 1101 ENDIF() 938 1102 939 1103 ADD_EXECUTABLE(gcn src/gcn.cc) 940 1104 TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} ${Qt}::${QtXml}) 1105 INSTALL(TARGETS gcn) 1106 INSTALL_LINK(gcn start.sh) 941 1107 MANPAGE(gcn "") 942 1108 943 1109 ADD_EXECUTABLE(scheduler src/scheduler.cc) 944 1110 TARGET_LINK_LIBRARIES(scheduler ${FACT++LIBS}) 1111 INSTALL(TARGETS scheduler) 1112 INSTALL_LINK(scheduler start.sh) 945 1113 MANPAGE(scheduler "") 946 1114 947 1115 ADD_EXECUTABLE(gpsctrl src/gpsctrl.cc) 948 1116 TARGET_LINK_LIBRARIES(gpsctrl ${FACT++LIBS}) 1117 INSTALL(TARGETS gpsctrl) 1118 INSTALL_LINK(gpsctrl start.sh) 949 1119 MANPAGE(gpsctrl "") 950 1120 951 1121 ADD_EXECUTABLE(lidctrl src/lidctrl.cc) 952 1122 TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS} ${Qt}::${QtXml}) 1123 INSTALL(TARGETS lidctrl) 1124 INSTALL_LINK(lidctrl start.sh) 953 1125 MANPAGE(lidctrl "") 954 1126 955 1127 ADD_EXECUTABLE(magiclidar src/magiclidar.cc) 956 1128 TARGET_LINK_LIBRARIES(magiclidar ${FACT++LIBS}) 1129 INSTALL(TARGETS magiclidar) 1130 INSTALL_LINK(magiclidar start.sh) 957 1131 MANPAGE(magiclidar "") 958 1132 959 1133 ADD_EXECUTABLE(magicweather src/magicweather.cc) 960 1134 TARGET_LINK_LIBRARIES(magicweather ${FACT++LIBS}) 1135 INSTALL(TARGETS magicweather) 1136 INSTALL_LINK(magicweather start.sh) 961 1137 MANPAGE(magicweather "") 962 1138 963 1139 ADD_EXECUTABLE(mcp src/mcp.cc) 964 1140 TARGET_LINK_LIBRARIES(mcp ${FACT++LIBS}) 1141 INSTALL(TARGETS mcp) 1142 INSTALL_LINK(mcp start.sh) 965 1143 MANPAGE(mcp "") 966 1144 967 1145 ADD_EXECUTABLE(pfminictrl src/pfminictrl.cc) 968 1146 TARGET_LINK_LIBRARIES(pfminictrl ${FACT++LIBS}) 1147 INSTALL(TARGETS pfminictrl) 1148 INSTALL_LINK(pfminictrl start.sh) 969 1149 MANPAGE(pfminictrl "") 970 1150 971 1151 ADD_EXECUTABLE(pwrctrl src/pwrctrl.cc src/HeadersPower.cc) 972 1152 TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} ${Qt}::${QtXml}) 1153 INSTALL(TARGETS pwrctrl) 1154 INSTALL_LINK(pwrctrl start.sh) 973 1155 MANPAGE(pwrctrl "") 974 1156 975 1157 ADD_EXECUTABLE(rainsensor src/rainsensor.cc) 976 1158 TARGET_LINK_LIBRARIES(rainsensor ${FACT++LIBS}) 1159 INSTALL(TARGETS rainsensor) 1160 INSTALL_LINK(rainsensor start.sh) 977 1161 MANPAGE(rainsensor "") 978 1162 979 1163 ADD_EXECUTABLE(ratecontrol src/ratecontrol.cc) 980 1164 TARGET_LINK_LIBRARIES(ratecontrol ${FACT++LIBS}) 1165 INSTALL(TARGETS ratecontrol) 1166 INSTALL_LINK(ratecontrol start.sh) 981 1167 MANPAGE(ratecontrol "") 982 1168 983 1169 ADD_EXECUTABLE(ratescan src/ratescan.cc) 984 1170 TARGET_LINK_LIBRARIES(ratescan ${FACT++LIBS}) 1171 INSTALL(TARGETS ratescan) 1172 INSTALL_LINK(ratescan start.sh) 985 1173 MANPAGE(ratescan "") 986 1174 … … 995 1183 ADD_EXECUTABLE(sqmctrl src/sqmctrl.cc) 996 1184 TARGET_LINK_LIBRARIES(sqmctrl ${FACT++LIBS}) 1185 INSTALL(TARGETS sqmctrl) 1186 INSTALL_LINK(sqmctrl start.sh) 997 1187 MANPAGE(sqmctrl "") 998 1188 999 1189 ADD_EXECUTABLE(smartfact src/smartfact.cc) 1000 1190 TARGET_LINK_LIBRARIES(smartfact ${FACT++LIBS}) # HAVE_NOVA 1191 INSTALL(TARGETS smartfact) 1192 INSTALL_LINK(smartfact start.sh) 1001 1193 MANPAGE(smartfact "") 1002 1194 1003 1195 ADD_EXECUTABLE(temperature src/temperature.cc) 1004 1196 TARGET_LINK_LIBRARIES(temperature ${FACT++LIBS}) 1197 INSTALL(TARGETS temperature) 1198 INSTALL_LINK(temperature start.sh) 1005 1199 MANPAGE(temperature "") 1006 1200 1007 1201 ADD_EXECUTABLE(timecheck src/timecheck.cc) 1008 1202 TARGET_LINK_LIBRARIES(timecheck ${FACT++LIBS}) 1203 INSTALL(TARGETS timecheck) 1204 INSTALL_LINK(timecheck start.sh) 1009 1205 MANPAGE(timecheck "") 1010 1206 1011 1207 ADD_EXECUTABLE(tngweather src/tngweather.cc) 1012 1208 TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} ${Qt}::${QtXml}) 1209 INSTALL(TARGETS tngweather) 1210 INSTALL_LINK(tngweather start.sh) 1013 1211 MANPAGE(tngweather "") 1014 1212 … … 1059 1257 ${QWT_LIBRARY} ZLIB::ZLIB) 1060 1258 1259 INSTALL(TARGETS viewer) 1260 INSTALL_LINK(viewer) 1261 1061 1262 #ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY) 1062 1263 … … 1094 1295 ${QWT_LIBRARY} ZLIB::ZLIB) 1095 1296 1297 INSTALL(TARGETS fact) 1298 INSTALL_LINK(fact) 1096 1299 1097 1300 #dclient5_SOURCES = src/dclient5.cc src/LocalControl.h … … 1122 1325 ADD_EXECUTABLE(famousbias famous/src/famousbias.cc) 1123 1326 TARGET_LINK_LIBRARIES(famousbias ${FACT++LIBS}) 1327 INSTALL(TARGETS famousbias) 1328 INSTALL_LINK(famousbias start.sh) 1124 1329 MANPAGE(famousbias "") 1125 1330 1126 1331 ADD_EXECUTABLE(famousui famous/ui/famousui.cc) 1127 1332 TARGET_LINK_LIBRARIES(famousui ${FACT++LIBS}) 1333 INSTALL(TARGETS famousui) 1334 INSTALL_LINK(famousui start.sh) 1128 1335 MANPAGE(famousui "") 1129 1336 1130 1337 ADD_EXECUTABLE(ftuctrl famous/src/ftuctrl.cc) 1131 1338 TARGET_LINK_LIBRARIES(ftuctrl ${FACT++LIBS}) 1339 INSTALL(TARGETS ftuctrl) 1340 INSTALL_LINK(ftuctrl start.sh) 1132 1341 MANPAGE(ftuctrl "") 1133 1134 ADD_EXECUTABLE(fpgaftmctrl famous/src/fpgaftmctrl.cc)1135 TARGET_LINK_LIBRARIES(fpgaftmctrl ${FACT++LIBS})1136 MANPAGE(fpgaftmctrl "")1137 1342 1138 1343 ADD_EXECUTABLE(famousrate famous/src/famousrate.cc) 1139 1344 TARGET_LINK_LIBRARIES(famousrate ${FACT++LIBS}) 1345 INSTALL(TARGETS famousrate) 1346 INSTALL_LINK(famousrate start.sh) 1140 1347 MANPAGE(famousrate "") 1141 1348 1142 1349 ADD_EXECUTABLE(famousscan famous/src/famousscan.cc) 1143 1350 TARGET_LINK_LIBRARIES(famousscan ${FACT++LIBS}) 1351 INSTALL(TARGETS famousscan) 1352 INSTALL_LINK(famousscan start.sh) 1144 1353 MANPAGE(famousscan "") 1145 1354 1146 1355 ADD_EXECUTABLE(beaglectrl famous/src/beaglectrl.cc) 1147 1356 TARGET_LINK_LIBRARIES(beaglectrl ${FACT++LIBS} ${Qt}::${QtXml}) 1357 INSTALL(TARGETS beaglectrl) 1358 INSTALL_LINK(beaglectrl start.sh) 1148 1359 MANPAGE(beaglectrl "") 1149 1360 ENDIF() … … 1158 1369 ADD_EXECUTABLE(iceactpsu iceact/src/psuctrl.cc) 1159 1370 TARGET_LINK_LIBRARIES(iceactpsu ${FACT++LIBS}) 1371 INSTALL(TARGETS iceactpsu) 1372 INSTALLLINK(iceactpsu start.sh) 1160 1373 MANPAGE(iceactpsu "") 1161 1374 1162 1375 ADD_EXECUTABLE(tmonctrl iceact/src/tmonctrl.cc) 1163 1376 TARGET_LINK_LIBRARIES(tmonctrl ${FACT++LIBS}) 1377 INSTALL(TARGETS tmonctrl) 1378 INSTALL_LINK(tmonctrl start.sh) 1164 1379 MANPAGE(tmonctrl "") 1165 1380 ENDIF() … … 1170 1385 # ********************************* 1171 1386 1387 SET(DNS "10.0.100.10" CACHE STRING "Default IP of the DNS used to create default fact++.rc") 1388 1389 # Prepare the file for build interface 1390 SET(INSTALL_PREFIX ${CMAKE_BINARY_DIR}) 1391 CONFIGURE_FILE(fact++.rc.in fact++.rc @ONLY) 1392 1393 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/rc) 1394 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/log) 1395 1396 IF(NOT CMAKE_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX_DEFAULT) 1397 1398 # Prepare default fact++.rc for installation 1399 SET(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) 1400 CONFIGURE_FILE(fact++.rc.in fact++rc.install @ONLY) 1401 INSTALL(FILES ${CMAKE_BINARY_DIR}/fact++rc.install DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME fact++.rc) 1402 1403 # Create empty directories during installation 1404 INSTALL(DIRECTORY "log" DESTINATION ${CMAKE_INSTALL_PREFIX}) 1405 INSTALL(DIRECTORY "rc" DESTINATION ${CMAKE_INSTALL_PREFIX}) 1406 1407 INSTALL(CODE "MESSAGE(STATUS \"Preparing environment.\")") 1408 ENDIF() 1409 1410 1172 1411 # ======== Setup directories ====== 1173 1412 1174 1413 # MESSAGE("") 1175 # MESSAGE("PREFIX: "${CMAKE_INSTALL_PREFIX})1176 1414 # MESSAGE("") 1177 1415 # MESSAGE("BINDIR: "${CMAKE_INSTALL_FULL_BINDIR}) … … 1206 1444 # MESSAGE("") 1207 1445 1208 SET(PKG_SHARE "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}") 1209 SET(PKG_APPS "${CMAKE_INSTALL_DATAROOTDIR}/applications") 1210 SET(PKG_PIXMAPS "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps") 1211 1212 # ====== Installation targets ===== 1213 1214 IF (NOT VIEWER_ONLY) 1215 1216 INSTALL(TARGETS fits2sql DESTINATION "${CMAKE_INSTALL_BINDIR}") 1217 INSTALL(TARGETS zfits DESTINATION "${CMAKE_INSTALL_BINDIR}") 1218 INSTALL(TARGETS showlog DESTINATION "${CMAKE_INSTALL_BINDIR}") 1219 1220 IF(NOT NO_ROOT) 1221 INSTALL(TARGETS rootifysql DESTINATION "${CMAKE_INSTALL_BINDIR}") 1222 INSTALL(TARGETS root2sql DESTINATION "${CMAKE_INSTALL_BINDIR}") 1223 INSTALL(TARGETS root2csv DESTINATION "${CMAKE_INSTALL_BINDIR}") 1224 INSTALL(TARGETS csv2root DESTINATION "${CMAKE_INSTALL_BINDIR}") 1225 INSTALL(TARGETS fitsdump DESTINATION "${CMAKE_INSTALL_BINDIR}") 1226 INSTALL(TARGETS calcsource DESTINATION "${CMAKE_INSTALL_BINDIR}") 1227 INSTALL(TARGETS calcsourcemc DESTINATION "${CMAKE_INSTALL_BINDIR}") 1228 ENDIF() 1229 1230 ENDIF(NOT VIEWER_ONLY) 1231 1232 INSTALL(TARGETS Configuration DESTINATION "${CMAKE_INSTALL_LIBDIR}") 1233 INSTALL(TARGETS Time DESTINATION "${CMAKE_INSTALL_LIBDIR}") 1234 INSTALL(TARGETS Tools DESTINATION "${CMAKE_INSTALL_LIBDIR}") 1235 1446 #SET(PKG_SHARE "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}") 1447 #SET(PKG_APPS "${CMAKE_INSTALL_DATAROOTDIR}/applications") 1448 #SET(PKG_PIXMAPS "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps") 1236 1449 1237 1450 #INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/html DESTINATION "${PKG_SHARE}" FILES_MATCHING PATTERN "*.html")
Note:
See TracChangeset
for help on using the changeset viewer.