From 09388540b5e809a806a5f5af98ea71c8f6b6b895 Mon Sep 17 00:00:00 2001 From: richi235 Date: Sun, 17 Jul 2016 01:06:14 +0200 Subject: [PATCH 1/2] Make possible compiling on Debian stretch -fPIC is needed becauso of the way the qt libraries are built for debian. from the build error message: ``` You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough) ." ``` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6eea00..646ade8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project(kdevkernel) find_package(KDE4 4.7.0 REQUIRED) find_package(KDevPlatform 1.2.60 REQUIRED) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") include_directories( ${KDE4_INCLUDES} From 4a2c6367aea4fe70772577a79a396af86e41eda7 Mon Sep 17 00:00:00 2001 From: richi235 Date: Sun, 17 Jul 2016 01:31:19 +0200 Subject: [PATCH 2/2] Set correct install path for Debian Of course this breaks the setup for fedora or other distros. Therefore this commit is more a quick and dirty solution for debian users or advanced issue report. For a robust solution detection of the right install path would be necesarry. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 646ade8..707fb1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,7 @@ +set(SERVICES_INSTALL_DIR /usr/share/kde4/services) +set(DATA_INSTALL_DIR /usr/share/kde4/apps) +set(PLUGIN_INSTALL_DIR /usr/lib/kde4) + project(kdevkernel) find_package(KDE4 4.7.0 REQUIRED)