Hi,
I've noticed that when using a prebuild package of cmake, the --help options
don't work because they try to read the documentation from the source
directory rather than the installed directory.
Below is my patch to fix this. Its made against the "KDE cmake" snapshot but
looking at cmake CVS, the code seems still the same.
--
Dirk//\
--- Source/cmDocumentation.cxx
+++ Source/cmDocumentation.cxx
@@ -217,9 +217,14 @@
bool cmDocumentation::CreateModulesSection()
{
this->ModulesSection.push_back(cmDocumentationModulesHeader[0]);
-#ifdef CMAKE_ROOT_DIR
- std::string cmakeModules = CMAKE_ROOT_DIR;
- cmakeModules += "/Modules";
+#ifdef CMAKE_DATA_DIR
+ std::string cmakeModules =
+#ifdef CMAKE_PREFIX
+ CMAKE_PREFIX
+#endif
+ CMAKE_DATA_DIR;
+
+ cmakeModules += "/Modules/";
cmsys::Directory dir;
dir.Load(cmakeModules.c_str());
for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i)
@@ -996,8 +1001,12 @@
os << "Argument --help-module needs a module name.\n";
return false;
}
-#ifdef CMAKE_ROOT_DIR
- std::string cmakeModules = CMAKE_ROOT_DIR;
+#ifdef CMAKE_DATA_DIR
+ std::string cmakeModules =
+#ifdef CMAKE_PREFIX
+ CMAKE_PREFIX
+#endif
+ CMAKE_DATA_DIR;
cmakeModules += "/Modules/";
cmakeModules += this->SingleModuleName;
cmakeModules += ".cmake";
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem