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.
master
Nicolas Hake 2018-12-31 12:48:19 +01:00
parent 3b0891ba89
commit 7cd79b1eaa
1 changed files with 3 additions and 4 deletions

View File

@ -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