Merge pull request #64 from giresun28/master
kf5-extra-cmake-modules.düzenlendi
This commit is contained in:
		
						commit
						fa5f2f2aa0
					
				
					 2 changed files with 1 additions and 49 deletions
				
			
		| 
						 | 
				
			
			@ -1,46 +0,0 @@
 | 
			
		|||
From: Aleix Pol <aleixpol@kde.org>
 | 
			
		||||
Date: Mon, 18 Jul 2016 12:45:02 +0000
 | 
			
		||||
Subject: Make sure ECMGeneratePriFile.cmake behaves like the rest of ECM
 | 
			
		||||
X-Git-Url: http://quickgit.kde.org/?p=extra-cmake-modules.git&a=commitdiff&h=5bb92992317a6cf878c823cadac6dd0ccff969d6
 | 
			
		||||
---
 | 
			
		||||
Make sure ECMGeneratePriFile.cmake behaves like the rest of ECM
 | 
			
		||||
 | 
			
		||||
In KDEInstallDirs we have some code to make sure that qmake is asked when
 | 
			
		||||
the project shares the prefix with the installed Qt, to make sure that if
 | 
			
		||||
something was changed in the distribution it would reflect on the projects.
 | 
			
		||||
 | 
			
		||||
Make sure PRI files are installed using the same reasoning.
 | 
			
		||||
 | 
			
		||||
REVIEW: 128427
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--- a/modules/ECMGeneratePriFile.cmake
 | 
			
		||||
+++ b/modules/ECMGeneratePriFile.cmake
 | 
			
		||||
@@ -84,11 +84,23 @@
 | 
			
		||||
 # (To distribute this file outside of extra-cmake-modules, substitute the full
 | 
			
		||||
 #  License text for the above reference.)
 | 
			
		||||
 
 | 
			
		||||
-if(KDE_INSTALL_USE_QT_SYS_PATHS)
 | 
			
		||||
+
 | 
			
		||||
+# Replicate the logic from KDEInstallDirs.cmake as we can't depend on it
 | 
			
		||||
+# Ask qmake if we're using the same prefix as Qt
 | 
			
		||||
+set(_askqmake OFF)
 | 
			
		||||
+if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS)
 | 
			
		||||
+    include(ECMQueryQmake)
 | 
			
		||||
+    query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX)
 | 
			
		||||
+    if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
 | 
			
		||||
+        set(_askqmake ON)
 | 
			
		||||
+    endif()
 | 
			
		||||
+endif()
 | 
			
		||||
+
 | 
			
		||||
+if(KDE_INSTALL_USE_QT_SYS_PATHS OR _askqmake)
 | 
			
		||||
   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 ()
 | 
			
		||||
+else()
 | 
			
		||||
   set(ECM_MKSPECS_INSTALL_DIR mkspecs/modules CACHE PATH "The directory where mkspecs will be installed to.")
 | 
			
		||||
 endif()
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -9,12 +9,10 @@ release=1
 | 
			
		|||
_name=extra-cmake-modules
 | 
			
		||||
_version=5.26
 | 
			
		||||
 | 
			
		||||
source=( http://download.kde.org/stable/frameworks/${_version}/${_name}-$version.tar.xz
 | 
			
		||||
         pri-install-dir.patch)
 | 
			
		||||
source=( http://download.kde.org/stable/frameworks/${_version}/${_name}-$version.tar.xz)
 | 
			
		||||
 | 
			
		||||
build() {
 | 
			
		||||
cd ${_name}-$version
 | 
			
		||||
patch -p1 -i ../pri-install-dir.patch
 | 
			
		||||
cmake -DCMAKE_INSTALL_PREFIX=/usr  \
 | 
			
		||||
      -DECM_MKSPECS_INSTALL_DIR=/usr/lib/qt5/mkspecs
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue