summaryrefslogtreecommitdiffstats
path: root/Modules/BundleUtilities.cmake
Commit message (Collapse)AuthorAgeFilesLines
* BundleUtilities: Allow Info.plist files which use CR line endingsTim Blechmann2014-08-071-0/+1
| | | | | | Convert \r to our internal end-of-line character just as we do \n. Signed-off-by: Tim Blechmann <tim@klingt.org>
* Remove .* expressions from beginning and end of MATCHES regexsRolf Eike Beer2014-04-141-2/+2
| | | | | | | | | All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
* Replace string(REGEX REPLACE) with string(REPLACE) where possibleRolf Eike Beer2014-04-141-3/+3
| | | | The simple replacement is much faster.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-107/+168
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* BundleUtilities: Use a more inclusive REGEX for frameworks (#13600)David Cole2012-10-231-1/+1
| | | | | | | | | | | | | Some frameworks might be built with the library right at the root of the framework rather than down in a versioned sub-folder with a symlink at the root. Make one of the slashes in the REGEX optional so BundleUtilities can still properly work with such frameworks ... even if they are weird. ;-) Thanks to Tobias Hieta for the bug report and for trying out the fix before I pushed this commit.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-77/+77
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Merge topic 'fix-12034-fixup-bundle-with-non-dotapp-exe'Brad King2011-06-071-26/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 51e16c0 BundleUtilities: Avoid test on Watcom dashboards (#12034) 41f962a Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found." e17135e BundleUtilities: Add rpath to loadable modules in test. 8064044 BundleUtilities: Print reason for not loading module.so f3de459 BundleUtilities: Run test on Windows if either MSVC or dumpbin was found. 900bf98 BundleUtilities: Disable running test on Windows unless using MSVC. fa4dc08 BundleUtilities: Fix issues with custom target DEPENDS in test (#12034) e40b79e BundleUtilities: Fix test when using xcode (#12034) b68d3dc BundleUtilities: Fix regex to extract dependents from ldd (#12034) 7ac7b43 BundleUtilities: Work w/ non .app exes on Mac (#12034)
| * BundleUtilities: Work w/ non .app exes on Mac (#12034)Clinton Stimpson2011-05-271-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | Also add a test of BundleUtilities including an exe, some shared libs, a plugin, and a framework-style lib. This test presently runs (and this functionality works) on Linux, Mac and Windows. For now, the framework-style lib is built as a plain old shared lib because there is another yet-unresolved issue with local frameworks without rpaths on the Mac.
* | BundleUtilities: Avoid a cryptic and unhelpful error messageDavid Cole2011-06-021-3/+15
|/ | | | | | | | | | | | | When the path to "resolved_embedded_item" was shorter than the path to the bundle being fixed up, fixup_bundle would fail with a cmake error like: "string end index: 110 is out of range 0 - 85" Detect when the path of resolved_embedded_item is too short to be embedded in the bundle, and report the proper error message, so the poor developer reading it has a snowball's chance of actually fixing the issue.
* BundleUtilities: error if fixup_bundle_item called on non-embedded itemDavid Cole2010-12-061-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, improve the documentation of the fixup_bundle and fixup_bundle_item functions to clarify that plugin type "libs" need to be copied into the bundle *before* calling fixup_bundle. Commit e93a4b4d3421ced7b8c852b76c0dcb427f798df8 changed the way that the libs parameter to fixup_bundle is interpreted. Before the commit, the libs were copied into the bundle first and then fixed up. After the commit, the copy was skipped, assuming the libs were in the bundle in the first place, and then the fixups occurred as before. However, before the commit, it was possible to name a lib from outside the bundle, and have it copied in and then fixed up. Its resolved embedded name was always inside the bundle before. After, its resolved embedded name was just the same as its resolved name, which is in its original location, and not necessarily inside the bundle. This manifested itself as a problem with the ParaView call to fixup_bundle and its many plugins. Previously, ParaView had simply passed in the list of plugin file names as they existed in the build tree, and left the copying into the bundle up to the fixup_bundle function. When built with CMake 2.8.3 (the first version to contain the above named commit) the fixup_bundle call would inadventently fixup libraries in the build tree, not libraries that were in the bundle. Furthermore, the plugins would not be in the final bundle. This points out the fact that the fix for the bugs made by the above commit was a backwards-incompatible change in behavior. This commit makes it an error to try to fixup an item that is not already inside the bundle to make the change in behavior apparent to folks who were depending on the prior copy-in behavior: now, they should get an error, and hopefully, reading the new and improved documentation, should be able to resolve it in their projects by adding code to install or copy in such libraries prior to calling fixup_bundle. Whew.
* BundleUtilities: only do rpath strip on copied prerequisites.Clinton Stimpson2010-11-231-6/+6
|
* Merge topic 'fix-10417'Brad King2010-09-081-1/+1
|\ | | | | | | | | e93a4b4 Avoid adding self as prerequisite. (#10417)
| * Avoid adding self as prerequisite. (#10417)David Cole2010-09-081-1/+1
| | | | | | | | Thanks to Clinton Stimpson for the patch.
* | Make bundle items writable before fixup (#9284)Mike McQuaid2010-09-081-0/+7
|/ | | | | | | | This ensures that any bundle items are made user writable before any attempt is made to alter them using install_name_tool. This is because MacPorts/Fink/Homebrew don't install libraries as writable. This fix is needed to allow fixup_bundle_item to work correctly when ingesting libraries installed by these package managers.
* Refine formatting for cmake --help-module output.David Cole2010-08-251-3/+2
| | | | Also refer to self as module, not script.
* Merge branch 'patches/docBundleUtilities'David Cole2010-08-251-127/+113
|\ | | | | | | | | | | | | | | | | | | | | of http://github.com/themiwi/CMake into fix-10747 Conflicts: Modules/BundleUtilities.cmake There was one newly added function in BundleUtilities.cmake which also needed the same "documentation at top" treatment.
| * Improve documentation of BundleUtilities.cmakeMichael Wild2010-05-231-116/+103
| | | | | | | | | | | | | | Put the function documentation into the header-comment, improve formatting and list the user-relevant functions first. Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
* | Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
| |
* | Copy Resources in Frameworks during fixup_bundle (#10020)David Cole2010-07-271-2/+62
|/ | | | | | | | | By default, if an embedded item is a framework, copy its main dylib file explicitly, and then also its Resources if it has any. Inspect a variable, BU_COPY_FULL_FRAMEWORK_CONTENTS, and if it's ON, copy the entire framework into the bundle.
* Fix issue #9412 - remove RPATH from files copied by BundleUtilities.cmake on ↵David Cole2009-09-281-0/+4
| | | | Linux. Thanks to Clinton Stimpson for the patch.
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+12
| | | | | | | This adds copyright/license notification blocks CMake's non-find modules. Most of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* Overhaul GetPrerequisites and BundleUtilities: make fixup_bundle do ↵David Cole2009-08-051-21/+53
| | | | | | something useful on Windows and Linux. Formerly, fixup_bundle was useful only on the Mac for making standalone bundle applications that could be drag-n-drop moved to anyplace in the file system. fixup_bundle is not just for the Mac any more. It will now analyze executable files on Windows and Linux, too, and copy necessary non-system dlls to the same folder that the executable is in. This should work with dlls that you build as part of your build and also with 3rd-party dlls as long as you give fixup_bundle the right list of directories to search for those dlls. Many thanks to Clinton Stimpson for his help in ironing out the details involved in making this work.
* ENH: Add BundleUtilities.cmake and supporting changes to ↵David Cole2008-09-061-0/+645
GetPrerequisites.cmake. Function copy_and_fixup_bundle in BundleUtilities helps to make standalone bundle applications on the Mac by pulling in prerequisite non-system libraries and frameworks as needed. Uses otool and install_name_tool to do analysis and fixups. Project-specific hooks for deciding where to embed libraries and for resolving item names into full path file names are also provided.