diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-05-21 15:13:56 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-05-21 15:13:56 (GMT) |
commit | d7976058e419ae4e88377e82b1e56999a899d24b (patch) | |
tree | d34b427ea8325f495f73428c01674bad5b56d2f0 /Source | |
parent | 92d59accce060b62344a878fa47ba3bdf253eda7 (diff) | |
download | CMake-d7976058e419ae4e88377e82b1e56999a899d24b.zip CMake-d7976058e419ae4e88377e82b1e56999a899d24b.tar.gz CMake-d7976058e419ae4e88377e82b1e56999a899d24b.tar.bz2 |
bug fix in finding CMAKE_ROOT
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 56efc38..8915c68 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -180,19 +180,23 @@ void cmake::AddCMakePaths(char **av) { // try exe/../share/cmake modules = cMakeRoot + "/share/CMake/Modules"; -#if !defined(_WIN32) || defined(__CYGWIN__) if (!cmSystemTools::FileIsDirectory(modules.c_str())) { +#if !defined(_WIN32) || defined(__CYGWIN__) // try compiled in value on UNIX - std::string cMakeRoot = CMAKE_ROOT_DIR; + cMakeRoot = CMAKE_ROOT_DIR; modules = cMakeRoot + "/Modules"; - } #endif - if (!cmSystemTools::FileIsDirectory(modules.c_str())) + if (!cmSystemTools::FileIsDirectory(modules.c_str())) + { + // couldn't find modules + cmSystemTools::Error("Could not find CMAKE_ROOT !!!"); + return; + } + } + else { - // couldn't find modules - cmSystemTools::Error("Could nto find CMAKE_ROOT !!!"); - return; + cMakeRoot = cMakeRoot + "/share/CMake"; } } } |