[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1793-g19bdcdd
Alexander Neundorf
neundorf at kde.org
Sun Jan 27 13:23:10 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 19bdcddcaf48a72e060a2e57ad9fb16b882e2abe (commit)
via 4cad84836989c6c9e4da97fced637b7bdbc222c7 (commit)
via 37c4bc1f86a72a76a1ccc3094ba7cc3ec134ff21 (commit)
via d4774140b7fa8685a9f29147308fd7fe5365e1fb (commit)
from 400b6ceff2137ab69b2f3cc6345cdf3e043e5a53 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19bdcddcaf48a72e060a2e57ad9fb16b882e2abe
commit 19bdcddcaf48a72e060a2e57ad9fb16b882e2abe
Merge: 400b6ce 4cad848
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Sun Jan 27 13:23:09 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 27 13:23:09 2013 -0500
Merge topic 'PackageConfigHelper_UsrMove' into next
4cad848 configure_package_config_file(): extend documentation
37c4bc1 configure_package_config_file(): fix indentation
d477414 configure_package_config_file: force absolute paths for usr-move
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cad84836989c6c9e4da97fced637b7bdbc222c7
commit 4cad84836989c6c9e4da97fced637b7bdbc222c7
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jan 24 21:27:32 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Jan 24 21:27:32 2013 +0100
configure_package_config_file(): extend documentation
Alex
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index d6d3cb1..393d05c 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -9,6 +9,8 @@
# configure_file() command when creating the <Name>Config.cmake or <Name>-config.cmake
# file for installing a project or library. It helps making the resulting package
# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
+# <Name>Config.cmake files installed under UNIX into /lib(64) or /usr/lib(64) are
+# considered system packages and are not relocatable.
#
# In a FooConfig.cmake file there may be code like this to make the
# install destinations know to the using project:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37c4bc1f86a72a76a1ccc3094ba7cc3ec134ff21
commit 37c4bc1f86a72a76a1ccc3094ba7cc3ec134ff21
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jan 24 21:18:47 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Jan 24 21:18:47 2013 +0100
configure_package_config_file(): fix indentation
This is a separate commit, so that the previous commit is smaller.
Alex
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 13617ce..d6d3cb1 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -194,12 +194,12 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
set(PACKAGE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
else()
- if(IS_ABSOLUTE "${${var}}")
- string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
- PACKAGE_${var} "${${var}}")
- else()
- set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
- endif()
+ if(IS_ABSOLUTE "${${var}}")
+ string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
+ PACKAGE_${var} "${${var}}")
+ else()
+ set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
+ endif()
endif()
endif()
endforeach()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4774140b7fa8685a9f29147308fd7fe5365e1fb
commit d4774140b7fa8685a9f29147308fd7fe5365e1fb
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jan 24 21:15:58 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Jan 24 21:15:58 2013 +0100
configure_package_config_file: force absolute paths for usr-move
The configure_package_config()_file() macro will now use
absolute paths for the PATH_VARS if the Config.cmake file
will be installed into /lib(64) or /usr/lib(64), since due to
the usr-move filesystem changes Config.cmake files installed
there may be found via two paths (once per symlink via
/lib(64) and once via /usr/lib ), and in this case
relative paths break.
Alex
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index a92ce7c..13617ce 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -173,18 +173,34 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
else()
set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
endif()
+
+ # with the /usr-move, /lib(64) is a symlink to /usr/lib on Fedora, ArchLinux, Mageira and others.
+ # If we are installed to such a location, force using absolute paths.
+ set(forceAbsolutePaths FALSE)
+ if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+")
+ set(forceAbsolutePaths TRUE)
+ endif()
+
file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
foreach(var ${CCF_PATH_VARS})
if(NOT DEFINED ${var})
message(FATAL_ERROR "Variable ${var} does not exist")
else()
+ if(forceAbsolutePaths)
+ if(IS_ABSOLUTE "${${var}}")
+ set(PACKAGE_${var} "${${var}}")
+ else()
+ set(PACKAGE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
+ endif()
+ else()
if(IS_ABSOLUTE "${${var}}")
string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
PACKAGE_${var} "${${var}}")
else()
set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
endif()
+ endif()
endif()
endforeach()
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakePackageConfigHelpers.cmake | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list