From 96e7fb9969b761cce956a3500ede3b1c6cb29c65 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Wed, 3 Sep 2014 14:28:14 +0200 Subject: Fix ECM to use qmake instead of hardcoding plugin install dirs Packagers and other interested folks should pass -DKDE_INSTALL_USE_QT_SYS_PATHS=ON when building in order to install various files to the same dir as the Qt5 install dirs. CCMAIL: kde-packagers@kde.org REVIEW: 119901 --- modules/ECMGeneratePriFile.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/ECMGeneratePriFile.cmake') diff --git a/modules/ECMGeneratePriFile.cmake b/modules/ECMGeneratePriFile.cmake index 34001d6c..53cd69db 100644 --- a/modules/ECMGeneratePriFile.cmake +++ b/modules/ECMGeneratePriFile.cmake @@ -82,7 +82,13 @@ # (To distribute this file outside of extra-cmake-modules, substitute the full # License text for the above reference.) -set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.") +if(KDE_ECM_INSTALL_TO_QT_SYS_DIR) + include(ECMQueryQmake) + query_qmake(qt_host_data_dir QT_HOST_DATA) + set(ECM_MKSPECS_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.") +else () + set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.") +endif() function(ECM_GENERATE_PRI_FILE) set(options ) -- cgit v1.2.1