[Cmake-commits] CMake branch, next, updated. v3.0.2-2107-g14f7445

Brad King brad.king at kitware.com
Tue Oct 21 11:43:44 EDT 2014


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  14f74453d3650c52e69f56c2d088083020719422 (commit)
       via  41564ff289b486ea0ccff46cb51f7ac3250f0312 (commit)
      from  237b9b330ee34ee1226bed66e1edaa3b9be332aa (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=14f74453d3650c52e69f56c2d088083020719422
commit 14f74453d3650c52e69f56c2d088083020719422
Merge: 237b9b3 41564ff
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 21 11:43:44 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 21 11:43:44 2014 -0400

    Merge topic 'fix-OSX-bundle-rpaths-and-Qt5' into next
    
    41564ff2 BundleUtilities: Ensure framework symlinks and Info.plist exist


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41564ff289b486ea0ccff46cb51f7ac3250f0312
commit 41564ff289b486ea0ccff46cb51f7ac3250f0312
Author:     Adam Strzelecki <ono at java.pl>
AuthorDate: Tue Oct 21 16:42:33 2014 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 21 11:42:30 2014 -0400

    BundleUtilities: Ensure framework symlinks and Info.plist exist
    
    This restores Qt SDK 4.8 and OS X >= 10.6.5 codesign compatibility
    improving embedding frameworks using correct bundle layout described at:
    
    https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
    
    1. If Versions/VERSION/Resources/Info.plist is missing, well known
       incorrect locations are checked for Info.plist and Info.plist is
       copied from there, otherwise codesign will fail.
    
    2. Root framework symlinks to binary and Resources are restored to
       point inside Versions/Current, otherwise Qt 4.8 looking for
       Resources/ in framework root will fail.

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 445c719..fee0a7c 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -655,8 +655,12 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
       if(EXISTS "${resolved_resources}")
         #message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy_directory '${resolved_resources}' '${resolved_embedded_resources}'")
         execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_resources}" "${resolved_embedded_resources}")
-      else()
-        # Otherwise try at least copy Contents/Info.plist to Resources/Info.plist, if it exists:
+      endif()
+
+      # Some frameworks e.g. Qt put Info.plist in wrong place, so when it is
+      # missing in resources, copy it from other well known incorrect locations:
+      if(NOT EXISTS "${resolved_resources}/Info.plist")
+        # Check for Contents/Info.plist in framework root (older Qt SDK):
         string(REGEX REPLACE "^(.*)/[^/]+/[^/]+/[^/]+$" "\\1/Contents/Info.plist" resolved_info_plist "${resolved_item}")
         string(REGEX REPLACE "^(.*)/[^/]+$" "\\1/Resources/Info.plist" resolved_embedded_info_plist "${resolved_embedded_item}")
         if(EXISTS "${resolved_info_plist}")
@@ -674,6 +678,16 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
         if(NOT EXISTS "${resolved_embedded_versions}/Current")
           execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${resolved_embedded_version}" "${resolved_embedded_versions}/Current")
         endif()
+        # Restore symlinks in framework root pointing to current framework
+        # binary and resources:
+        string(REGEX REPLACE "^(.*)/[^/]+/[^/]+/[^/]+$" "\\1" resolved_embedded_root "${resolved_embedded_item}")
+        string(REGEX REPLACE "^.*/([^/]+)$" "\\1" resolved_embedded_item_basename "${resolved_embedded_item}")
+        if(NOT EXISTS "${resolved_embedded_root}/${resolved_embedded_item_basename}")
+          execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "Versions/Current/${resolved_embedded_item_basename}" "${resolved_embedded_root}/${resolved_embedded_item_basename}")
+        endif()
+        if(NOT EXISTS "${resolved_embedded_root}/Resources")
+          execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "Versions/Current/Resources" "${resolved_embedded_root}/Resources")
+        endif()
       endif()
     endif()
     if(UNIX AND NOT APPLE)

-----------------------------------------------------------------------

Summary of changes:
 Modules/BundleUtilities.cmake |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list