1 From 0d76d960727018bddf04c6cc89552af69aaa7e55 Mon Sep 17 00:00:00 2001
2 From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
3 Date: Sun, 15 Apr 2018 22:20:34 +0200
4 Subject: [PATCH] Add missing Qt5Network, Qt5Test, make BUILD_WITH_QT4 more
8 CMakeLists.txt | 22 +++++++++++-----------
9 1 file changed, 11 insertions(+), 11 deletions(-)
11 diff --git a/CMakeLists.txt b/CMakeLists.txt
12 index 2a1f652..eb006d9 100644
15 @@ -5,25 +5,25 @@ project( libmygpo-qt )
16 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
17 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )
19 -option(BUILD_WITH_QT4 "Build libmygpo-qt with Qt4 no matter if Qt5 was found" OFF)
20 +option(BUILD_WITH_QT4 "Build libmygpo-qt with Qt4" OFF)
22 if( NOT BUILD_WITH_QT4 )
23 - find_package(Qt5Core QUIET)
25 - set(MYGPO_QT_VERSION_SUFFIX 5)
28 - qt5_wrap_cpp(${ARGN})
30 + if( MYGPO_BUILD_TESTS )
31 + find_package(Qt5 REQUIRED COMPONENTS Core Network Test CONFIG)
33 + find_package(Qt5 REQUIRED COMPONENTS Core Network CONFIG)
35 + set(MYGPO_QT_VERSION_SUFFIX 5)
38 + qt5_wrap_cpp(${ARGN})
41 # pkg-config names of QtCore and QtNetwork are Qt5Core and Qt5Network for
43 set(MYGPO_QT_MAJOR_VERSION "5")
44 set(MYGPO_QT4_QJSON_DEP "")
47 -if( NOT Qt5Core_DIR )
49 message(STATUS "Could not find Qt5, searching for Qt4 instead...")
50 message(STATUS "Qt4 Support is deprecated, building with Qt4 is no longer officially supported")
51 if( MYGPO_BUILD_TESTS )