diff options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 44e6fce..52b5f12 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -188,7 +188,7 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args) #ifdef CMAKE_ROOT_DIR else if (!cmSystemTools::FileExists(modules.c_str())) { - // try compiled in value on UNIX + // try compiled in root directory cMakeRoot = CMAKE_ROOT_DIR; modules = cMakeRoot + "/Modules/FindVTK.cmake"; } @@ -196,14 +196,16 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args) #ifdef CMAKE_PREFIX else if (!cmSystemTools::FileExists(modules.c_str())) { - // try compiled in value on UNIX + // try compiled in install prefix cMakeRoot = CMAKE_PREFIX "/share/CMake"; modules = cMakeRoot + "/Modules/FindVTK.cmake"; } #endif else if (!cmSystemTools::FileExists(modules.c_str())) { - cMakeRoot = cMakeRoot + "/share/CMake"; + // try + cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str()); + cMakeRoot += "/share/CMake"; modules = cMakeRoot + "/Modules/FindVTK.cmake"; } else if (!cmSystemTools::FileExists(modules.c_str())) |