mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
ENH: Added optional configuration of data/doc/man dirs. This will be useful for package maintainers.
This commit is contained in:
+1
-16
@@ -356,22 +356,7 @@ ENDIF(BUILD_TESTING)
|
||||
INCLUDE (${CMAKE_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
|
||||
INCLUDE (${CMAKE_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
|
||||
|
||||
IF(WIN32)
|
||||
SET(CMD ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/cmake.exe)
|
||||
ELSE(WIN32)
|
||||
SET(CMD ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/cmake)
|
||||
ENDIF(WIN32)
|
||||
|
||||
MAKE_DIRECTORY(${CMake_BINARY_DIR}/Docs)
|
||||
ADD_CUSTOM_TARGET(documentation ALL ${CMD}
|
||||
--copyright ${CMake_BINARY_DIR}/Docs/Copyright.txt
|
||||
--help-full ${CMake_BINARY_DIR}/Docs/cmake.txt
|
||||
--help-html ${CMake_BINARY_DIR}/Docs/cmake.html
|
||||
--help-man ${CMake_BINARY_DIR}/Docs/cmake.1
|
||||
)
|
||||
ADD_DEPENDENCIES(documentation cmake)
|
||||
|
||||
INSTALL_TARGETS(/bin cmake)
|
||||
INSTALL_TARGETS(/bin ctest)
|
||||
INSTALL_TARGETS(/bin cmaketest)
|
||||
INSTALL_FILES(/share/CMake/include cmCPluginAPI.h)
|
||||
INSTALL_FILES(${CMAKE_DATA_DIR}/include cmCPluginAPI.h)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
// This is sort of a boot strapping approach since you would
|
||||
// like to have CMake to build CMake.
|
||||
#include "cmCommands.h"
|
||||
#include "cmAddCustomCommandCommand.cxx"
|
||||
#include "cmAddCustomTargetCommand.cxx"
|
||||
#include "cmAddDefinitionsCommand.cxx"
|
||||
#include "cmAddDependenciesCommand.cxx"
|
||||
@@ -74,7 +75,6 @@
|
||||
// support etc, which makes the bootstrap configure file a mess
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include "cmAbstractFilesCommand.cxx"
|
||||
#include "cmAddCustomCommandCommand.cxx"
|
||||
#include "cmAuxSourceDirectoryCommand.cxx"
|
||||
#include "cmExportLibraryDependencies.cxx"
|
||||
#include "cmFLTKWrapUICommand.cxx"
|
||||
@@ -111,6 +111,7 @@
|
||||
|
||||
void GetPredefinedCommands(std::list<cmCommand*>& commands)
|
||||
{
|
||||
commands.push_back(new cmAddCustomCommandCommand);
|
||||
commands.push_back(new cmAddCustomTargetCommand);
|
||||
commands.push_back(new cmAddDefinitionsCommand);
|
||||
commands.push_back(new cmAddDependenciesCommand);
|
||||
@@ -163,7 +164,6 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
commands.push_back(new cmAbstractFilesCommand);
|
||||
commands.push_back(new cmAddCustomCommandCommand);
|
||||
commands.push_back(new cmAuxSourceDirectoryCommand);
|
||||
commands.push_back(new cmExportLibraryDependenciesCommand);
|
||||
commands.push_back(new cmFLTKWrapUICommand);
|
||||
|
||||
@@ -9,3 +9,5 @@
|
||||
#define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@
|
||||
#define CMake_VERSION_MINOR @CMake_VERSION_MINOR@
|
||||
#define CMake_VERSION_PATCH @CMake_VERSION_PATCH@
|
||||
|
||||
#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@"
|
||||
|
||||
+3
-3
@@ -445,7 +445,7 @@ int cmake::AddCMakePaths(const char *arg0)
|
||||
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||
{
|
||||
// try exe/../share/cmake
|
||||
cMakeRoot += "/share/CMake";
|
||||
cMakeRoot += CMAKE_DATA_DIR;
|
||||
modules = cMakeRoot + "/Modules/CMakeDefaultMakeRuleVariables.cmake";
|
||||
}
|
||||
#ifdef CMAKE_ROOT_DIR
|
||||
@@ -460,7 +460,7 @@ int cmake::AddCMakePaths(const char *arg0)
|
||||
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||
{
|
||||
// try compiled in install prefix
|
||||
cMakeRoot = CMAKE_PREFIX "/share/CMake";
|
||||
cMakeRoot = CMAKE_PREFIX CMAKE_DATA_DIR;
|
||||
modules = cMakeRoot + "/Modules/CMakeDefaultMakeRuleVariables.cmake";
|
||||
}
|
||||
#endif
|
||||
@@ -468,7 +468,7 @@ int cmake::AddCMakePaths(const char *arg0)
|
||||
{
|
||||
// try
|
||||
cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str());
|
||||
cMakeRoot += "/share/CMake";
|
||||
cMakeRoot += CMAKE_DATA_DIR;
|
||||
modules = cMakeRoot + "/Modules/CMakeDefaultMakeRuleVariables.cmake";
|
||||
}
|
||||
if(!cmSystemTools::FileExists(modules.c_str()))
|
||||
|
||||
Reference in New Issue
Block a user