From 4d006b56b53351e8ca9e806099d7c99eea3edf8e Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 27 Oct 2017 15:14:31 +0200 Subject: [PATCH] Fix PLUGIN_PATH when FALKON_INSTALL_PLUGINDIR is absolute --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ecf31d32..19790b745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,11 @@ if (UNIX AND NOT APPLE) else() set(FALKON_INSTALL_PLUGINDIR "${KDE_INSTALL_PLUGINDIR}") endif() -add_definitions(-DPLUGIN_PATH=\"${CMAKE_INSTALL_PREFIX}/${FALKON_INSTALL_PLUGINDIR}\") +if (IS_ABSOLUTE ${FALKON_INSTALL_PLUGINDIR}) + add_definitions(-DPLUGIN_PATH=\"${FALKON_INSTALL_PLUGINDIR}\") +else() + add_definitions(-DPLUGIN_PATH=\"${CMAKE_INSTALL_PREFIX}/${FALKON_INSTALL_PLUGINDIR}\") +endif() # Version (TODO: move to a generated header once qmake support is dropped, to avoid full recompilations when changing this add_definitions(-DFALKON_VERSION=\"${PROJECT_VERSION}\")