mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Update CMake to only look for Qt5 if RESINSIGHT_BUILD_WITH_QT5 is set
This commit is contained in:
parent
81e2132752
commit
17e12a92a0
@ -5,7 +5,10 @@ project (ApplicationCode)
|
||||
# Open GL
|
||||
find_package( OpenGL )
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Network Script Widgets)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Network Qt5::OpenGL Qt5::Script Qt5::Widgets)
|
||||
|
@ -2,7 +2,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (WellPathImportSsihub)
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Network)
|
||||
else()
|
||||
|
@ -232,13 +232,20 @@ list(APPEND THIRD_PARTY_LIBRARIES
|
||||
################################################################################
|
||||
# Qt
|
||||
################################################################################
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
message(STATUS "Attempting to build with Qt5")
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
else()
|
||||
message(STATUS "Attempting to build with Qt4")
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
message(STATUS "Found Qt5")
|
||||
find_package (Qt5 CONFIG REQUIRED Core Widgets OpenGL Network Script ScriptTools)
|
||||
else()
|
||||
message(STATUS "No Qt5 found, trying Qt4")
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
message("Could not find Qt5. Trying with Qt4")
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
||||
if (QT_VERSION_MINOR LESS 6)
|
||||
message(FATAL_ERROR "Qt 4.6 is required, please specify qmake for variable QT_QMAKE_EXECUTABLE")
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (CommonCode)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Widgets)
|
||||
else()
|
||||
|
@ -2,7 +2,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (cafAnimControl)
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -1,7 +1,10 @@
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafPdmCvf)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafProjectDataModel)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafPdmCore)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafPdmUiCore)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafPdmXml)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Xml)
|
||||
else()
|
||||
|
@ -8,7 +8,10 @@ endif (MSVC)
|
||||
project (cafUserInterface)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
|
||||
else()
|
||||
|
@ -3,7 +3,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafViewer)
|
||||
|
||||
# Qt
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Widgets)
|
||||
else()
|
||||
|
@ -5,8 +5,10 @@ project (cafVizExtensions)
|
||||
# Open GL
|
||||
find_package( OpenGL )
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Widgets)
|
||||
else()
|
||||
|
@ -10,8 +10,10 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
|
||||
endif()
|
||||
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Gui OpenGL Widgets)
|
||||
else()
|
||||
|
5
ThirdParty/Qwt/src/CMakeLists.txt
vendored
5
ThirdParty/Qwt/src/CMakeLists.txt
vendored
@ -7,7 +7,10 @@ if (MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
|
||||
endif()
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Concurrent Core OpenGL PrintSupport Widgets)
|
||||
else()
|
||||
|
5
ThirdParty/expressionparser/CMakeLists.txt
vendored
5
ThirdParty/expressionparser/CMakeLists.txt
vendored
@ -7,7 +7,10 @@ if(MSVC)
|
||||
message(STATUS "MSVC: Enabled increased number of sections in object files")
|
||||
endif()
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core)
|
||||
else()
|
||||
|
5
ThirdParty/nightcharts/CMakeLists.txt
vendored
5
ThirdParty/nightcharts/CMakeLists.txt
vendored
@ -2,7 +2,10 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (nightcharts)
|
||||
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
if (RESINSIGHT_BUILD_WITH_QT5)
|
||||
find_package(Qt5 COMPONENTS Core QUIET)
|
||||
endif(RESINSIGHT_BUILD_WITH_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Widgets)
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user