diff options
author | David Cole <david.cole@kitware.com> | 2012-03-03 20:03:50 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-03-09 03:43:19 (GMT) |
commit | 4693cf84927850da0c10aae4308363fdc5890379 (patch) | |
tree | 65a9cb43a0bb4b446fc233413c7e9494b914c9df /Source/CPack/cmCPackDragNDropGenerator.cxx | |
parent | ac2979e4b36577e10b2180624050e600179a53da (diff) | |
download | CMake-4693cf84927850da0c10aae4308363fdc5890379.zip CMake-4693cf84927850da0c10aae4308363fdc5890379.tar.gz CMake-4693cf84927850da0c10aae4308363fdc5890379.tar.bz2 |
Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)
Xcode 4.3 installs into "/Applications" by default, from the Mac App Store.
Also, the paths to the available SDKs changed: they are now within the
Xcode.app bundle.
PackageMaker is installed as a separate program, and may be installed
anywhere. It is not installed with Xcode 4.3 by default anymore.
Download the "Auxiliary Tools for Xcode" to get PackageMaker.
Put PackageMaker inside the Xcode.app bundle, in its nested Applications
folder, or put it alongside Xcode in "/Applications" and CMake will find
it.
Update references to "find" paths: add new possible locations for finding
Xcode.app and PackageMaker.app. Prefer the most recent version's locations
first, but keep the old locations as fallback search paths, too.
Thanks to all the contributors who provided and tested out various patches
for fixing this issue. Especially, but by no means limited to:
Francisco Requena EspĂ, Jamie Kirkpatrick and drfrogsplat.
Diffstat (limited to 'Source/CPack/cmCPackDragNDropGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 3b6135e..6aee401 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -63,6 +63,12 @@ cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator() //---------------------------------------------------------------------- int cmCPackDragNDropGenerator::InitializeInternal() { + // Starting with Xcode 4.3, look in "/Applications/Xcode.app" first: + // + std::vector<std::string> paths; + paths.push_back("/Applications/Xcode.app/Contents/Developer/Tools"); + paths.push_back("/Developer/Tools"); + const std::string hdiutil_path = cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false); if(hdiutil_path.empty()) @@ -75,7 +81,7 @@ int cmCPackDragNDropGenerator::InitializeInternal() this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str()); const std::string setfile_path = cmSystemTools::FindProgram("SetFile", - std::vector<std::string>(1, "/Developer/Tools"), false); + paths, false); if(setfile_path.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -86,7 +92,7 @@ int cmCPackDragNDropGenerator::InitializeInternal() this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str()); const std::string rez_path = cmSystemTools::FindProgram("Rez", - std::vector<std::string>(1, "/Developer/Tools"), false); + paths, false); if(rez_path.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, |