#4448 Clean up CAF Qt5-enabling/detection

This commit is contained in:
Gaute Lindkvist
2019-05-28 10:50:39 +02:00
parent 0544b19afe
commit 10afe4987b
16 changed files with 149 additions and 260 deletions

View File

@@ -6,17 +6,12 @@ project (cafProjectDataModel)
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 Gui Widgets)
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
else()
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
find_package(Qt4 COMPONENTS REQUIRED QtCore QtGui)
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
endif(CEE_USE_QT5)
set( PROJECT_FILES
cafFactory.h