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 /cmake | |
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 'cmake')
-rw-r--r-- | cmake/modules/QtVersionAbstraction.cmake | 104 | ||||
-rw-r--r-- | cmake/modules/Warnings.cmake | 1 |
2 files changed, 0 insertions, 105 deletions
diff --git a/cmake/modules/QtVersionAbstraction.cmake b/cmake/modules/QtVersionAbstraction.cmake deleted file mode 100644 index ce48b4487..000000000 --- a/cmake/modules/QtVersionAbstraction.cmake +++ /dev/null @@ -1,104 +0,0 @@ -# (c) 2014 Copyright ownCloud GmbH -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING* file. - -include (MacroOptionalFindPackage) -include (MacroLogFeature) - -find_package(Qt5Core REQUIRED) -find_package(Qt5Network REQUIRED) -find_package(Qt5Xml REQUIRED) -find_package(Qt5Concurrent REQUIRED) -if(UNIT_TESTING) - find_package(Qt5Test REQUIRED) -endif() - -if(NOT TOKEN_AUTH_ONLY) - find_package(Qt5Widgets REQUIRED) - if(APPLE) - find_package(Qt5MacExtras REQUIRED) - endif(APPLE) - - if(NOT NO_SHIBBOLETH) - find_package(Qt5WebKitWidgets) - find_package(Qt5WebKit) - if(NOT Qt5WebKitWidgets_FOUND) - message(FATAL_ERROR "Qt5WebKit required for Shibboleth. Use -DNO_SHIBBOLETH=1 to disable it.") - endif() - endif() -endif() - -# We need this to find the paths to qdbusxml2cpp and co -if (WITH_DBUS) - find_package(Qt5DBus REQUIRED) - include_directories(${Qt5DBus_INCLUDES}) - add_definitions(${Qt5DBus_DEFINITIONS}) -endif (WITH_DBUS) -include_directories(${Qt5Core_INCLUDES}) -add_definitions(${Qt5Core_DEFINITIONS}) -if (NOT WIN32) #implied on Win32 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -endif(NOT WIN32) -# set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") - -if(APPLE AND NOT TOKEN_AUTH_ONLY) - include_directories(${Qt5MacExtras_INCLUDE_DIRS}) - add_definitions(${Qt5MacExtras_DEFINITIONS}) - set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5MacExtras_LIBRARIES}) -endif() - -if(NOT BUILD_LIBRARIES_ONLY) - macro(qt_wrap_ui) - qt5_wrap_ui(${ARGN}) - endmacro() -else() - # hack - SET(QT_UIC_EXECUTABLE "") -endif() - -macro(qt_add_resources) - qt5_add_resources(${ARGN}) -endmacro() - -if(NOT TOKEN_AUTH_ONLY) - find_package(Qt5LinguistTools) - if(Qt5LinguistTools_FOUND) - macro(qt_add_translation) - qt5_add_translation(${ARGN}) - endmacro() - else() - macro(qt_add_translation) - endmacro() - endif() -else() - macro(qt_add_translation) - endmacro() -endif() - -macro(qt_add_dbus_interface) - qt5_add_dbus_interface(${ARGN}) -endmacro() - -macro(qt_add_dbus_adaptor) - qt5_add_dbus_adaptor(${ARGN}) -endmacro() - -macro(qt_wrap_cpp) - qt5_wrap_cpp(${ARGN}) -endmacro() - -macro(install_qt_executable) - install_qt5_executable(${ARGN}) -endmacro() - -macro(setup_qt) -endmacro() - -set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}") - -#Enable deprecated symbols -add_definitions("-DQT_DISABLE_DEPRECATED_BEFORE=0") -add_definitions("-DQT_DEPRECATED_WARNINGS") -add_definitions("-DQT_USE_QSTRINGBUILDER") #optimize string concatenation -add_definitions("-DQT_MESSAGELOGCONTEXT") #enable function name and line number in debug output - diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake index 0edabd2a9..8faff001f 100644 --- a/cmake/modules/Warnings.cmake +++ b/cmake/modules/Warnings.cmake @@ -4,7 +4,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion |