diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-12-14 17:10:33 +0300 |
---|---|---|
committer | Dominik Schmidt <dev@dominik-schmidt.de> | 2018-01-13 15:58:17 +0300 |
commit | 257d8142b1af06e1a3892be5110b7b69e38a0659 (patch) | |
tree | 62845dbfc9850dda732659b60e3d08d39c154ba5 /CMakeLists.txt | |
parent | 48c55b7d29e3910510364f1e621144565a739621 (diff) |
Build system: Get rid of QtVersionAbstraction.cmake
Use modern cmake with target_link_libraries and Qt5:: that
automatically add the include path and compile flags
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9975452f9..132d93b1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,4 @@ - -cmake_minimum_required(VERSION 2.6) -cmake_policy(VERSION 2.8.0) -if(POLICY CMP0020) - cmake_policy(SET CMP0020 NEW) -endif() +cmake_minimum_required(VERSION 3.0) project(client) @@ -61,14 +56,6 @@ if(NOT WITH_CRASHREPORTER) message(STATUS "Build of crashreporter disabled.") endif() -##### -## handle DBUS for Fdo notifications -if( UNIX AND NOT APPLE ) - add_definitions( -DUSE_FDO_NOTIFICATIONS) - set(WITH_DBUS ON) -endif() -#### - include(GNUInstallDirs) include(DefineInstallationPaths) include(GenerateExportHeader) @@ -77,6 +64,12 @@ include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC GIT_SHA1) +add_definitions( + -DQT_USE_QSTRINGBUILDER + -DQT_MESSAGELOGCONTEXT #enable function name and line number in debug output + -DQT_DEPRECATED_WARNINGS +) + # if we cannot get it from git, directly try .tag (packages) # this will work if the tar balls have been properly created # via git-archive. @@ -218,20 +211,6 @@ add_definitions( -D_WIN32_WINNT=0x0600) add_definitions( -DWINVER=0x0600) endif( WIN32 ) -include(QtVersionAbstraction) -setup_qt() -if (${Qt5Core_VERSION_MAJOR} EQUAL "5") - if (${Qt5Core_VERSION_MINOR} EQUAL "6" OR ${Qt5Core_VERSION_MINOR} GREATER 6) - else() - message(FATAL_ERROR "Qt 5.6 or higher is required.") - endif() - if (${Qt5Core_VERSION_MINOR} EQUAL "9" OR ${Qt5Core_VERSION_MINOR} GREATER 9) - else() - message(STATUS "For HTTP2 use Qt 5.9.2 or higher.") - endif() -endif() -message("Qt ${Qt5Core_VERSION} at ${Qt5Core_INCLUDE_DIRS}") - if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() |