diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-05-10 12:39:45 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-05-10 12:39:45 -0400 |
commit | 26e75041fa1b5198ef6cc6372c9b529a8189e649 (patch) | |
tree | 6dcb353781dda6154995beacd906cd2304c2898c /Source/CPack | |
parent | 5b3a2c84fc26bc74e36ecb187aa4456025fe45ea (diff) | |
download | cmake-26e75041fa1b5198ef6cc6372c9b529a8189e649.tar.gz |
BUG: Fix relative path to config file, fix cmake_install.cmake location problem
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/CPack/cpack.cxx | 25 |
2 files changed, 10 insertions, 16 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx index 8d5c832a67..4d34cd3d74 100644 --- a/Source/CPack/cmCPackGenericGenerator.cxx +++ b/Source/CPack/cmCPackGenericGenerator.cxx @@ -282,6 +282,7 @@ int cmCPackGenericGenerator::InstallProject() = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); const char* cmakeGenerator = this->GetOption("CPACK_CMAKE_GENERATOR"); + std::string currentWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory(); if ( cmakeProjects && *cmakeProjects ) { if ( !cmakeGenerator ) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 3143c2a5f9..effd78db9e 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -245,6 +245,7 @@ int main (int argc, char *argv[]) { if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) ) { + cpackConfigFile = cmSystemTools::CollapseFullPath(cpackConfigFile.c_str()); if ( !mf->ReadListFile(0, cpackConfigFile.c_str()) ) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, @@ -337,23 +338,15 @@ int main (int argc, char *argv[]) } if ( !mf->GetDefinition("CPACK_INSTALL_COMMANDS") && - !mf->GetDefinition("CPACK_INSTALLED_DIRECTORIES") ) + !mf->GetDefinition("CPACK_INSTALLED_DIRECTORIES") && + !mf->GetDefinition("CPACK_INSTALL_CMAKE_PROJECTS") ) { - cmsys::SystemTools::ConvertToUnixSlashes(cpackProjectDirectory); - std::string makeInstallFile - = cpackProjectDirectory + "/cmake_install.cmake"; - if ( !cmsys::SystemTools::FileExists(makeInstallFile.c_str()) ) - { - cmCPack_Log(&log, cmCPackLog::LOG_ERROR, - "Cannot find installation file: " << makeInstallFile.c_str() - << std::endl); - cmCPack_Log(&log, cmCPackLog::LOG_ERROR, - "Please specify build tree of the project that uses CMake, " - "specify CPACK_INSTALL_COMMANDS, or specify " - "CPACK_INSTALLED_DIRECTORIES." - << std::endl); - parsed = 0; - } + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Please specify build tree of the project that uses CMake using " + " CPACK_INSTALL_CMAKE_PROJECTS, specify CPACK_INSTALL_COMMANDS, or " + "specify CPACK_INSTALLED_DIRECTORIES." + << std::endl); + parsed = 0; } } } |