Changeset 18990
- Timestamp:
- 04/06/18 17:00:47 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/CMakeLists.txt
r18980 r18990 97 97 FIND_PACKAGE(GLUT) 98 98 FIND_PACKAGE(Curses) # FIXME : Requires ncurses panel 99 FIND_PACKAGE(ZLIB REQUIRED) 100 FIND_PACKAGE(Threads REQUIRED) 99 FIND_PACKAGE(ZLIB REQUIRED) # ZLIB::ZLIB 100 FIND_PACKAGE(Threads REQUIRED) # Threads::Threads 101 FIND_PACKAGE(OpenGL REQUIRED) # OpenGL::GL OpenGL::GLU 101 102 102 103 INCLUDE_DIRECTORIES("/usr/include/mysql") … … 116 117 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) 117 118 118 # =============== QT5 ============== 119 #find_package(Qt5Widgets) 119 # =============== QT4 ============== 120 120 #SET(CMAKE_AUTOMOC ON) 121 121 #SET(CMAKE_AUTORCC ON) 122 SET(CMAKE_INCLUDE_CURRENT_DIR) 123 FIND_PACKAGE(Qt5 COMPONENTS Core Widgets Xml REQUIRED) 124 #INCLUDE_DIRECTORIES(${Qt5_INCLUDE_DIR}) 122 SET(CMAKE_INCLUDE_CURRENT_DIR ON) 123 124 # set(CMAKE_AUTOMOC ON) 125 # set(CMAKE_INCLUDE_CURRENT_DIR ON) 126 # find_package(Qt4 4.4.3 REQUIRED QtGui QtXml) 127 # add_executable(myexe main.cpp) 128 # target_link_libraries(myexe Qt4::QtGui Qt4::QtXml) 129 130 # QtCore QtSql QtOpenGL QtXml 131 FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtXml) 132 INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR}) 133 INCLUDE_DIRECTORIES(${QT_QTGUI_INCLUDE_DIR}) 134 INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR}) 135 INCLUDE_DIRECTORIES(${QT_QTXML_INCLUDE_DIR}) 136 INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR}) 137 INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR}) 138 139 MESSAGE(${QT_INCLUDE_DIR}) 140 MESSAGE(${QT_QTGUI_INCLUDE_DIR}) 141 MESSAGE(${QT_QTSQL_INCLUDE_DIR}) 142 MESSAGE(${QT_QTXML_INCLUDE_DIR}) 143 MESSAGE(${QT_QTCORE_INCLUDE_DIR}) 144 MESSAGE(${QT_QTOPENGL_INCLUDE_DIR}) 125 145 126 146 # dbus-1 dbus-glib-1 … … 155 175 SET(CMAKE_CXX_FLAGS 156 176 "${CMAKE_CXX_FLAGS} \ 157 -D_REENTRANT -D__LINUX__ -DHAVE_ZLIB -DHAVE_V8 -DHAVE_SQL -DHAVE_NOVA \ 177 -D_REENTRANT -D__LINUX__ \ 178 -DHAVE_ZLIB -DHAVE_ROOT -DHAVE_V8 -DHAVE_SQL -DHAVE_NOVA -DHAVE_FITS \ 158 179 -DMARSVER=\\\"${VERSION}\\\" \ 159 180 -DPACKAGE_VERSION=\\\"${VERSION}\\\" \ 160 181 -DREVISION=\\\"${REVISION}\\\" \ 182 -DPACKAGE_NAME=\\\"FACT++\\\" \ 161 183 -DPACKAGE_STRING=\\\"FACT++\\\" \ 162 184 -DPACKAGE_URL=\\\"${PACKAGE_URL}\\\" \ … … 185 207 # -lASImage -lMinuit -lHistPainter -lThread 186 208 187 FIND_PACKAGE(ROOT REQUIRED COMPONENTS G ui Minuit)209 FIND_PACKAGE(ROOT REQUIRED COMPONENTS GQt) 188 210 INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS}) 189 211 … … 200 222 #ROOT_<command>_CMD PATH Full path for each ROOT executable (rootcling, root, hadd, etc.) 201 223 #ROOT_<option>_FOUND BOOL True for each enabled build option (e.g. cocoa, python, xrootd, etc.) 224 225 MESSAGE(${ROOT_LIBRARIES}) 226 202 227 203 228 # ------------------------------------------------------- … … 395 420 396 421 ADD_EXECUTABLE(fitsdump src/fitsdump.cc) 397 TARGET_LINK_LIBRARIES(fitsdump ${HELP++LIBS} ZLIB::ZLIB)422 TARGET_LINK_LIBRARIES(fitsdump ${HELP++LIBS} ${ROOT_LIBRARIES} ZLIB::ZLIB) 398 423 MANPAGE(fitsdump "") 399 424 … … 488 513 # StateMachine Tools Configuration Time Dim++ Dim DimExtension 489 514 # ${Boost_LIBRARIES} readline ncurses) 515 516 ADD_EXECUTABLE(datalogger src/datalogger.cc 517 src/DimState.cc 518 src/FitsFile.cc src/Fits.cc) 519 TARGET_LINK_LIBRARIES(datalogger ${FACT++LIBS} cfitsio CCfits) 520 MANPAGE(datalogger "") 490 521 491 522 ADD_EXECUTABLE(dimctrl src/dimctrl.cc … … 510 541 MANPAGE(evtserver "") 511 542 543 ADD_EXECUTABLE(fadctrl src/fadctrl.cc src/HeadersFAD.cc 544 src/EventBuilder.cc 545 src/FitsFile.cc 546 src/DataCalib.cc 547 src/DataWriteRaw.cc 548 src/DataWriteFits.cc 549 src/DataWriteFits2.cc 550 src/DataProcessorImp.cc) 551 TARGET_LINK_LIBRARIES(fadctrl ${FACT++LIBS} cfitsio CCfits ZLIB::ZLIB) 552 MANPAGE(fadctrl "") 553 512 554 ADD_EXECUTABLE(feedback src/feedback.cc) 513 555 TARGET_LINK_LIBRARIES(feedback ${FACT++LIBS}) … … 523 565 524 566 ADD_EXECUTABLE(gcn src/gcn.cc) 525 TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} ${NOVA_LIBRARY} )567 TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} ${NOVA_LIBRARY} Qt4::QtXml) 526 568 MANPAGE(gcn "") 527 QT5_USE_MODULES(gcn Xml)528 569 529 570 ADD_EXECUTABLE(gpsctrl src/gpsctrl.cc) … … 532 573 533 574 ADD_EXECUTABLE(lidctrl src/lidctrl.cc) 534 TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS}) 535 QT5_USE_MODULES(lidctrl Xml) 575 TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS} Qt4::QtXml) 536 576 MANPAGE(lidctrl "") 537 577 … … 553 593 554 594 ADD_EXECUTABLE(pwrctrl src/pwrctrl.cc src/HeadersPower.cc) 555 TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} )595 TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} Qt4::QtXml) 556 596 MANPAGE(pwrctrl "") 557 QT5_USE_MODULES(pwrctrl Xml)558 597 559 598 ADD_EXECUTABLE(ratecontrol src/ratecontrol.cc) … … 590 629 591 630 ADD_EXECUTABLE(tngweather src/tngweather.cc) 592 TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} )631 TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} Qt4::QtXml) 593 632 MANPAGE(tngweather "") 594 QT5_USE_MODULES(tngweather Xml)595 633 596 634 #ADD_EXECUTABLE(triggerschedule src/triggerschedule.cc) … … 598 636 #MANPAGE(triggerschedule "") 599 637 600 # ***************************************************************** 638 639 640 # ******************************************************** 641 # ****************** GUI Applications ******************** 642 # ******************************************************** 643 644 INCLUDE_DIRECTORIES(/usr/include/qwt-qt4 gui gui/RawEventsViewer) 645 FILE(WRITE ${CMAKE_BINARY_DIR}/design.h "#include \"ui_design.h\"") 646 647 # -------------------------------------------------------- 648 649 QT4_WRAP_UI(VIEWER_QT_HEADERS gui/RawEventsViewer/viewer.ui) 650 651 QT4_WRAP_CPP(VIEWER_QT_SOURCES 652 gui/RawEventsViewer/RawEventsViewer.h 653 gui/BasicGlCamera.h 654 gui/QCameraWidget.h 655 gui/Q3DCameraWidget.h) 656 657 ADD_EXECUTABLE(viewer 658 gui/RawEventsViewer/RawEventsViewer.cc 659 gui/BasicGlCamera.cc 660 gui/QCameraWidget.cc 661 gui/Q3DCameraWidget.cc 662 ${VIEWER_QT_HEADERS} 663 ${VIEWER_QT_SOURCES}) 664 665 TARGET_LINK_LIBRARIES(viewer 666 ${Boost_LIBRARIES} Configuration mysqlpp 667 Qt4::QtGui Qt4::QtOpenGL 668 GL GLU qwt-qt4 ZLIB::ZLIB) 669 670 # -------------------------------------------------------- 671 672 QT4_ADD_RESOURCES(FACT_QT_RESOURCES gui/design.qrc) 673 674 QT4_WRAP_UI(FACT_QT_HEADERS gui/design.ui) 675 676 QT4_WRAP_CPP(FACT_QT_SOURCES 677 gui/DockWindow.h 678 gui/MainWindow.h 679 gui/QCameraWidget.h 680 gui/BasicGlCamera.h) 681 682 ADD_EXECUTABLE(fact gui/fact.cc 683 gui/DockWindow.cc 684 gui/MainWindow.cc 685 gui/QCameraWidget.cc 686 gui/BasicGlCamera.cc 687 gui/HtmlDelegate.cc 688 gui/CheckBoxDelegate.cc 689 src/DimNetwork.cc 690 ${FACT_QT_HEADERS} 691 ${FACT_QT_SOURCES} 692 ${FACT_QT_RESOURCES}) 693 694 TARGET_LINK_LIBRARIES(fact 695 ${FACT++LIBS} 696 ${ROOT_LIBRARIES} 697 Qt4::QtGui Qt4::QtOpenGL Qt4::QtSql 698 GL GLU qwt-qt4 ZLIB::ZLIB) 699 601 700 602 701 #dclient5_SOURCES = src/dclient5.cc src/LocalControl.h … … 604 703 # libConfiguration.la 605 704 606 #fadctrl_SOURCES = src/fadctrl.cc src/LocalControl.h src/HeadersFAD.cc \607 # src/EventBuilder.cc src/EventBuilder.h \608 # src/DataProcessorImp.cc src/DataProcessorImp.h \609 # src/DataCalib.cc src/DataCalib.h \610 # src/DataWriteRaw.cc src/DataWriteRaw.h \611 # src/DrsCalib.h612 #if HAS_FITS613 #fadctrl_SOURCES += src/FitsFile.h src/FitsFile.cc \614 # src/DataWriteFits.cc src/DataWriteFits.h \615 # src/DataWriteFits2.cc src/DataWriteFits2.h616 #endif617 ##fadctrl_LDADD = libDim++.la libDim.la libDimExtension.la \618 # libStateMachine.la libTools.la libTime.la \619 # libConfiguration.la620 621 705 #argv_SOURCES = src/argv.cc 622 706 #argv_LDADD = libConfiguration.la … … 628 712 #test_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la 629 713 630 #datalogger_SOURCES = src/datalogger.cc src/LocalControl.h src/DimState.cc src/DimState.h 631 #if HAS_FITS 632 #datalogger_SOURCES += src/FitsFile.h src/FitsFile.cc src/Fits.h src/Fits.cc 633 #endif 634 #datalogger_LDADD = libDim++.la libDim.la libDimExtension.la \ 635 # libStateMachine.la libTools.la libTime.la \ 636 # libConfiguration.la 637 638 # ----- 639 640 #if HAS_GUI 641 642 #fact_DIALOGS = \ 643 # gui/design.ui 644 645 #fact_RESOURCES = \ 646 # gui/design.qrc 647 648 #fact_QT_SOURCES = \ 649 # gui/DockWindow.cc \ 650 # gui/MainWindow.cc \ 651 # gui/QCameraWidget.cc \ 652 # gui/BasicGlCamera.cc 653 654 #fact_SRCADD = $(fact_DIALOGS:.ui=.h) $(fact_RESOURCES:.qrc=.cc) $(fact_QT_SOURCES:.cc=.moc.cc) 655 656 #endif 657 658 # ----- 659 660 #if HAS_VIEWER 661 662 #viewer_DIALOGS = \ 663 # gui/RawEventsViewer/viewer.ui 664 665 #viewer_QT_SOURCES = \ 666 # gui/RawEventsViewer/RawEventsViewer.cc \ 667 # gui/BasicGlCamera.cc \ 668 # gui/QCameraWidget.cc \ 669 # gui/Q3DCameraWidget.cc 670 671 #viewer_SRCADD = $(viewer_DIALOGS:.ui=.h) $(viewer_RESOURCES:.qrc=.cc) $(viewer_QT_SOURCES:.cc=.moc.cc) 672 673 #endif 674 714 715 716 717 # ******************************************************** 718 # ********************** FAMOUS ************************** 719 # ******************************************************** 675 720 676 721 IF(FOUND_FAMOUS) … … 702 747 # MANPAGE(ratecontrol "") 703 748 ENDIF() 749 750 751 752 # ******************************************************** 753 # ********************** IceACT ************************** 754 # ******************************************************** 704 755 705 756 IF(FOUND_ICEACT)
Note:
See TracChangeset
for help on using the changeset viewer.