Changeset 19976 for trunk/FACT++
- Timestamp:
- 07/27/20 17:29:02 (4 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/CMakeLists.txt
r19973 r19976 229 229 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Boost FOUND_VAR Boost_FOUND REQUIRED_VARS Boost_INCLUDE_DIR Boost_LIBRARIES) 230 230 231 # =============== Q T4==============231 # =============== Qt4/Qt5 ============== 232 232 IF(NOT TOOLS_ONLY OR VIEWER_ONLY) 233 233 234 FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtXml) 235 FIND_PACKAGE(Qwt REQUIRED) 234 IF (NOT FORCE_QT5) 235 FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL QtSql QtXml QUIET) 236 ENDIF() 237 238 IF(Qt4_FOUND) 239 FIND_PACKAGE_MESSAGE(Qt4Found "Found Qt4 [Core Gui OpenGL Sql Xml]" "[${Qt4_FOUND}]") 240 SET(Qt Qt4) 241 SET(QtCore QtCore) 242 SET(QtGui QtGui) 243 SET(QtOpenGL QtOpenGL) 244 SET(QtSql QtSql) 245 SET(QtXml QtXml) 246 ADD_DEFINITIONS(-DHAVE_QT4) 247 ELSE() 248 IF (NOT FORCE_QT5) 249 FIND_PACKAGE_MESSAGE(Qt4NotFound "Qt4 [or one of: Core Gui OpenGL Sql Xml] NOT found, trying Qt5!" "[${Qt4_FOUND}]") 250 ENDIF() 251 FIND_PACKAGE(Qt5 COMPONENTS Core Gui OpenGL Sql Xml REQUIRED) 252 FIND_PACKAGE_MESSAGE(Qt5Found2 "Found Qt5: fact GUI will be disabled" "[${Qt5_FOUND}]") 253 SET(Qt Qt5) 254 SET(QtCore Core) 255 SET(QtGui Gui) 256 SET(QtOpenGL OpenGL) 257 SET(QtSql Sql) 258 SET(QtXml Xml) 259 ENDIF() 260 261 FIND_PACKAGE(Qwt REQUIRED) 236 262 237 263 ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY) … … 318 344 319 345 ENDIF(NOT NO_ROOT AND NOT VIEWER_ONLY) 346 347 # Note that in root 5.34/38 (and maybe others?) the ROOT_xxx_FOUND macros are broken 348 IF (NOT ROOT_GQt_FOUND) 349 FIND_LIBRARY(ROOT_GQt_LIBRARY NAMES GQt PATHS ${ROOT_LIBRARY_DIR}) 350 IF (ROOT_GQt_LIBRARY) 351 FIND_PACKAGE_MESSAGE(RootQGtLib "Found libGQt: ${ROOT_GQt_LIBRARY}" "[${ROOT_GQt_LIBRARY}]") 352 SET(ROOT_GQt_FOUND 1) 353 ELSE() 354 FIND_PACKAGE_MESSAGE(RootQGt "ROOT: libGQt not found, fact GUI disabled!" "[${ROOT_GQt_FOUND}]") 355 ENDIF() 356 ENDIF() 320 357 321 358 # -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree … … 824 861 825 862 ADD_EXECUTABLE(gcn src/gcn.cc) 826 TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} Qt4::QtXml)863 TARGET_LINK_LIBRARIES(gcn ${FACT++LIBS} ${Qt}::${QtXml}) 827 864 MANPAGE(gcn "") 828 865 … … 836 873 837 874 ADD_EXECUTABLE(lidctrl src/lidctrl.cc) 838 TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS} Qt4::QtXml)875 TARGET_LINK_LIBRARIES(lidctrl ${FACT++LIBS} ${Qt}::${QtXml}) 839 876 MANPAGE(lidctrl "") 840 877 … … 856 893 857 894 ADD_EXECUTABLE(pwrctrl src/pwrctrl.cc src/HeadersPower.cc) 858 TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} Qt4::QtXml)895 TARGET_LINK_LIBRARIES(pwrctrl ${FACT++LIBS} ${Qt}::${QtXml}) 859 896 MANPAGE(pwrctrl "") 860 897 … … 896 933 897 934 ADD_EXECUTABLE(tngweather src/tngweather.cc) 898 TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} Qt4::QtXml)935 TARGET_LINK_LIBRARIES(tngweather ${FACT++LIBS} ${Qt}::${QtXml}) 899 936 MANPAGE(tngweather "") 900 937 … … 911 948 IF (NOT TOOLS_ONLY OR VIEWER_ONLY) 912 949 913 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR} /qwt-qt4gui gui/RawEventsViewer)950 INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR} gui gui/RawEventsViewer) 914 951 915 952 # -------------------------------------------------------- 916 953 917 QT4_WRAP_UI(VIEWER_QT_HEADERS gui/RawEventsViewer/viewer.ui)918 919 QT4_WRAP_CPP(VIEWER_QT_SOURCES954 IF(QT4_FOUND) 955 QT4_WRAP_UI(VIEWER_QT_HEADERS gui/RawEventsViewer/viewer.ui) 956 QT4_WRAP_CPP(VIEWER_QT_SOURCES 920 957 gui/RawEventsViewer/RawEventsViewer.h 921 958 gui/BasicGlCamera.h 922 959 gui/QCameraWidget.h 923 960 gui/Q3DCameraWidget.h) 961 ELSE() 962 QT5_WRAP_UI(VIEWER_QT_HEADERS gui/RawEventsViewer/viewer.ui) 963 QT5_WRAP_CPP(VIEWER_QT_SOURCES 964 gui/RawEventsViewer/RawEventsViewer.h 965 gui/BasicGlCamera.h 966 gui/QCameraWidget.h 967 gui/Q3DCameraWidget.h) 968 ENDIF() 924 969 925 970 ADD_EXECUTABLE(viewer … … 933 978 TARGET_LINK_LIBRARIES(viewer 934 979 ${Boost_LIBRARIES} Configuration 935 Qt4::QtGui Qt4::QtOpenGL980 ${Qt}::${QtGui} ${Qt}::${QtOpenGL} 936 981 ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU 937 qwt-qt4ZLIB::ZLIB)982 ${QWT_LIBRARY} ZLIB::ZLIB) 938 983 939 984 #ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY) … … 941 986 # -------------------------------------------------------- 942 987 943 IF(NOT VIEWER_ONLY AND ROOT_GQt_FOUND )988 IF(NOT VIEWER_ONLY AND ROOT_GQt_FOUND AND Qt4_FOUND) 944 989 945 990 QT4_ADD_RESOURCES(FACT_QT_RESOURCES gui/design.qrc) … … 968 1013 ${FACT++LIBS} 969 1014 ${ROOT_LIBRARIES} 970 Qt4::QtGui Qt4::QtOpenGL Qt4::QtSql1015 ${Qt}::${QtGui} ${Qt}::${QtOpenGL} ${Qt}::${QtSql} 971 1016 ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU 972 qwt-qt4ZLIB::ZLIB)1017 ${QWT_LIBRARY} ZLIB::ZLIB) 973 1018 974 1019 … … 986 1031 #test_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la 987 1032 988 ENDIF(NOT VIEWER_ONLY AND ROOT_GQt_FOUND )1033 ENDIF(NOT VIEWER_ONLY AND ROOT_GQt_FOUND AND Qt4_FOUND) 989 1034 ENDIF(NOT TOOLS_ONLY OR VIEWER_ONLY) 990 1035 … … 1027 1072 1028 1073 ADD_EXECUTABLE(beaglectrl famous/src/beaglectrl.cc) 1029 TARGET_LINK_LIBRARIES(beaglectrl ${FACT++LIBS} Qt4::QtXml)1074 TARGET_LINK_LIBRARIES(beaglectrl ${FACT++LIBS} ${Qt}::${QtXml}) 1030 1075 MANPAGE(beaglectrl "") 1031 1076 ENDIF() -
trunk/FACT++/cmake/FindQwt.cmake
r19397 r19976 4 4 # Try to locate the package in the default path 5 5 # and in the path provided by pkg-config 6 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt-qt4/qwt.h PATHS ${QWT_INCLUDE_DIRS}) 7 FIND_LIBRARY(QWT_LIBRARY NAMES qwt-qt4 PATHS ${QWT_LIBRARY_DIRS}) 6 #FIND_PATH(QWT_INCLUDE_DIR NAMES qwt-qt4/qwt.h qwt/qwt.h PATHS ${QWT_INCLUDE_DIRS}) 7 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS ${QWT_INCLUDE_DIRS} PATH_SUFFIXES qwt qwt-qt4) 8 FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt-qt4 PATHS ${QWT_LIBRARY_DIRS}) 8 9 9 10 # Check if QWT_LIBARARY and QWT_INCLUDE_DIR is set
Note:
See TracChangeset
for help on using the changeset viewer.