From: Manuel Nickschas Date: Mon, 6 Aug 2018 21:27:10 +0000 (+0200) Subject: cmake: Remove some compiler flags that are no longer needed X-Git-Tag: test-travis-01~169 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=60587d8c119e15b61ff7830ff9f6904b8511d174 cmake: Remove some compiler flags that are no longer needed With the move to a property-based build system, we no longer need special handling of -fPIC for Qt. Also remove some things related to old KDE and CMake. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fb704145..bbf5e57f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,12 +364,6 @@ add_feature_info("SSL support in Qt" HAVE_SSL "Use secure network connections") # Additional compile settings ##################################################################### -# This sets -fPIC and friends if required by the installed Qt5 library -if (Qt5_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) - set(CMAKE_REQUIRED_FLAGS "-DQT_NO_VERSION_TAGGING") -endif() - # Needed to compile with mingw without kde if (MINGW AND NOT WITH_KDE) add_definitions(-D_WIN32_WINNT=0x0500) @@ -378,11 +372,6 @@ if (MINGW AND NOT WITH_KDE) add_definitions(-U__STRICT_ANSI__) endif() -# Sanitize compiler flags - old versions of KDE set -ansi, which breaks -std=c++11 -if (CMAKE_COMPILER_IS_GNUCXX) - string(REPLACE "-ansi" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -endif() - # Setup LDAP Authentication support. ##################################################################### if (WITH_LDAP) @@ -448,7 +437,6 @@ if (WIN32) set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:YES /NODEFAULTLIB:libcmt") set(CMAKE_EXE_LINKER_FLAGS_DEBUGFULL "${CMAKE_EXE_LINKER_FLAGS_DEBUG}") link_libraries(Version dwmapi shlwapi) - set(QT_QTMAIN_LIBRARY Qt5::WinMain) endif() endif()