Switch to more robust check for Qt5 for cafUserInterface. This should be applied to other projects

This commit is contained in:
Gaute Lindkvist 2018-12-07 12:55:46 +01:00
parent c0b7b5d87e
commit c51b938d03

View File

@ -5,8 +5,10 @@ if (MSVC)
add_definitions(-DNOMINMAX)
endif (MSVC)
project (cafUserInterface)
# Qt
find_package(Qt5Core CONFIG QUIET)
find_package(Qt5 COMPONENTS Core QUIET)
if (Qt5Core_FOUND)
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets)
else()
@ -14,9 +16,6 @@ else()
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
project (cafUserInterface)
# These headers need to go through Qt's MOC compiler
set (MOC_HEADER_FILES
cafPdmUiCheckBoxDelegate.h