mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add Qt5 test to AppFwk main CMakeLists.txt and update CAF to use CEE_USE_QT5
This commit is contained in:
@@ -3,12 +3,19 @@ cmake_minimum_required (VERSION 2.8.12)
|
||||
project (cafPdmXml)
|
||||
|
||||
# Qt
|
||||
if (CAF_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS Core Xml REQUIRED)
|
||||
option(CEE_USE_QT5 "Use Qt5" OFF)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5Core CONFIG QUIET)
|
||||
endif(CEE_USE_QT5)
|
||||
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5 CONFIG REQUIRED Core Xml)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS QtCore QtXml REQUIRED)
|
||||
find_package(Qt4 COMPONENTS QtCore QtXml REQUIRED)
|
||||
include(${QT_USE_FILE})
|
||||
endif(CAF_USE_QT5)
|
||||
endif(Qt5Core_FOUND)
|
||||
|
||||
include_directories (
|
||||
..
|
||||
@@ -48,10 +55,6 @@ add_library( ${PROJECT_NAME}
|
||||
${PROJECT_FILES}
|
||||
)
|
||||
|
||||
if (CAF_USE_QT5)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Xml)
|
||||
endif(CAF_USE_QT5)
|
||||
|
||||
target_link_libraries ( ${PROJECT_NAME}
|
||||
cafPdmCore
|
||||
${QT_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user