From e3554d72745d9c439b1792c20be09871506afeef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:11:20 +0100 Subject: remove useless unset()s there is mightily little point in unsetting variables right before unconditionally assigning to them. Change-Id: I24c1814ce38bf9aab4496679b1a670f3cd55c536 Reviewed-by: Joerg Bornemann --- mkspecs/features/exclusive_builds.prf | 8 -------- mkspecs/features/qt_functions.prf | 1 - 2 files changed, 9 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf index 8898c96a43..0e0da05c70 100644 --- a/mkspecs/features/exclusive_builds.prf +++ b/mkspecs/features/exclusive_builds.prf @@ -1,9 +1,6 @@ # fixExclusiveOutputDirs(1config, 2config) # Change all output paths that references 2config to have the string 1config in them defineTest(fixExclusiveOutputDirs) { - unset(firstBuild) - unset(secondBuild) - unset(appendFirstBuild) firstBuild = $$1 secondBuild = $$2 count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false @@ -29,11 +26,6 @@ defineTest(fixExclusiveOutputDirs) { # addExclusiveBuilds(1config, 1name, 2config, 2name) # Adds two BUILDS which are exclusive to each other. defineTest(addExclusiveBuilds) { - unset(firstBuild) - unset(firstBuildName) - unset(secondBuild) - unset(secondBuildName) - firstBuild = $$1 firstBuildName = $$2 secondBuild = $$3 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index aaf7a4710e..b6e3454f0e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -9,7 +9,6 @@ defineReplace(qtPlatformTargetSuffix) { } defineReplace(qtLibraryTarget) { - unset(LIBRARY_NAME) LIBRARY_NAME = $$1 mac:!static:contains(QT_CONFIG, qt_framework) { QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME -- cgit v1.2.3 From 7ac58d1ff0815566ba1de09519299b5119e5ee91 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 11 Feb 2013 13:59:34 +0100 Subject: Make cmake packages installed to /usr non-relocatable. This is for dealing with fallout from the UsrMove: http://fedoraproject.org/wiki/Features/UsrMove http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5327 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5868/focus=5907 Change-Id: I6380e3bad17a016a8252b615ce962e3008a5d809 Reviewed-by: Brad King Reviewed-by: Stephen Kelly --- mkspecs/features/create_cmake.prf | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index a06f268769..43dca4cd70 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -36,14 +36,24 @@ CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.) CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::") !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}" +# Several distros (ArchLinux, Fedora) have in the past installed libraries +# in /lib(64)?, but are now moving to install libraries in /usr/lib(64)?/. +# The /lib paths are made symlinks to the /usr/lib paths. If someone searching +# for a Qt 5 package finds it in /lib/cmake/Qt5Core, although it has been +# installed in /usr/lib/cmake/Qt5Core, relative paths to the includes and +# executables will not work. So, we treat installations to /usr as non-relocatable +# packages with absolute paths. +CMAKE_INSTALL_LIBS_DIR = $$[QT_INSTALL_LIBS] +contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_FORCE_ABSOLUTE_PATHS = True + CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True } CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_LIB_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_LIB_DIR,"^\\.\\./.*") { CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ CMAKE_LIB_DIR_IS_ABSOLUTE = True } else { @@ -54,13 +64,13 @@ contains(CMAKE_LIB_DIR, "^\\.\\./.*") { } CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_BIN_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_BIN_DIR, "^\\.\\./.*") { CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ CMAKE_BIN_DIR_IS_ABSOLUTE = True } CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True } -- cgit v1.2.3