diff options
author | Brad King <brad.king@kitware.com> | 2013-11-07 20:30:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-12 13:23:35 (GMT) |
commit | d1526f825e7464b8cb8a82b73718bbf2eb4965c9 (patch) | |
tree | 1830c8bb82b07c4a1c35145b677f975c9104a2b4 /Source/CPack/cmCPackGenerator.cxx | |
parent | 9fc158b6d5ae9902f544fd280c3b087c433fecc6 (diff) | |
download | CMake-d1526f825e7464b8cb8a82b73718bbf2eb4965c9.zip CMake-d1526f825e7464b8cb8a82b73718bbf2eb4965c9.tar.gz CMake-d1526f825e7464b8cb8a82b73718bbf2eb4965c9.tar.bz2 |
Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT. Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.
Teach FindCMakeResources to use the OS X system API to lookup the
executable location. When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree. This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.
Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle. This ensures a consistent set
of executables are available in one directory.
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 63a7596..0e16a40 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1143,12 +1143,6 @@ int cmCPackGenerator::Initialize(const char* name, cmMakefile* mf) { this->MakefileMap = mf; this->Name = name; - if ( !this->SetCMakeRoot() ) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot initialize the generator" << std::endl); - return 0; - } // set the running generator name this->SetOption("CPACK_GENERATOR", this->Name.c_str()); // Load the project specific config file @@ -1205,32 +1199,6 @@ const char* cmCPackGenerator::GetOption(const char* op) const } //---------------------------------------------------------------------- -int cmCPackGenerator::SetCMakeRoot() -{ - // use the CMAKE_ROOT from cmake which should have been - // found by now - const char* root= - this->MakefileMap->GetDefinition("CMAKE_ROOT"); - - if(root) - { - this->CMakeRoot = root; - cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " - << this->CMakeRoot.c_str() << std::endl); - this->SetOption("CMAKE_ROOT", this->CMakeRoot.c_str()); - return 1; - } - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Could not find CMAKE_ROOT !!!" - << std::endl - << "CMake has most likely not been installed correctly." - << std::endl - <<"Modules directory not found in" - << std::endl); - return 0; -} - -//---------------------------------------------------------------------- int cmCPackGenerator::PackageFiles() { return 0; |