From 7cd79b1eaa3992f12191f8a0be29a6438d312110 Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Mon, 31 Dec 2018 12:48:19 +0100 Subject: [PATCH] CMake: Use native Qt5 config instead of bad reimplementation Qt5 already ships CMake configuration files with proper dependencies so there's no need to build our own broken test for it. --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c4eaeaa9..db1bb0c78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,10 +353,9 @@ if(NOT C4GROUP_TOOL_ONLY) include_directories(SYSTEM ${SDL2_INCLUDE_DIRS}) # Qt5 for editor - find_path(Qt5DIR qt.pro PATHS ${CMAKE_ADDITIONAL_DEPS_PATH}/qt-5.5.0) - find_package(Qt5Widgets 5.4 PATHS ${Qt5DIR}/qtbase/lib/cmake/Qt5Widgets) - if(Qt5Widgets_FOUND) - SET(WITH_QT_EDITOR ${Qt5Widgets_FOUND} "Qt editor dialogues available") + find_package(Qt5 5.4 CONFIG COMPONENTS Core Widgets) + if(TARGET Qt5::Core) + SET(WITH_QT_EDITOR ON "Qt editor dialogues available") set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) # As moc files are generated in the binary dir, tell CMake