diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-05-17 16:14:18 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-05-17 16:14:18 (GMT) |
commit | 2e3c418500241c7a3c08edbada69eb779964fcef (patch) | |
tree | 383eb7c19a7913110cfa83421c1d59b6e7f8dbfd | |
parent | aa72e182fe88aeacb4a812c1041499973922d3cd (diff) | |
download | CMake-2e3c418500241c7a3c08edbada69eb779964fcef.zip CMake-2e3c418500241c7a3c08edbada69eb779964fcef.tar.gz CMake-2e3c418500241c7a3c08edbada69eb779964fcef.tar.bz2 |
unix fix
-rw-r--r-- | Source/CMakeBuildTargets.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx index 9d5bdb3..057f149 100644 --- a/Source/CMakeBuildTargets.cxx +++ b/Source/CMakeBuildTargets.cxx @@ -65,6 +65,19 @@ int main(int ac, char** av) Usage(av[0]); return -1; } + + // set the cmake root directory + std::string root = cmSystemTools::GetProgramPath(av[0]); + std::string::size_type slashPos = root.rfind("/"); + if(slashPos != std::string::npos) + { + root = root.substr(0, slashPos); + } + cmCacheManager::GetInstance()->AddCacheEntry + ("CMAKE_ROOT", root.c_str(), + "Path to CMake installation.", cmCacheManager::INTERNAL); + + // Create a makefile cmMakefile mf; mf.AddDefinition("UNIX", "1"); @@ -133,7 +146,6 @@ int main(int ac, char** av) cMakeSelf.c_str(), "Path to CMake executable.", cmCacheManager::INTERNAL); - mf.SetCMakeInstallDirectory(cmSystemTools::FindProgram(av[0])); // Transfer the cache into the makefile's definitions. cmCacheManager::GetInstance()->DefineCache(&mf); |