diff options
author | Brad King <brad.king@kitware.com> | 2003-07-21 20:38:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-07-21 20:38:53 (GMT) |
commit | a1bb1a47129380421fd9490688502ce5bee2e59f (patch) | |
tree | fadcd7e650d2da27ca29c2a5da6195969abe355b /Source | |
parent | d4afed0724866e093f0ae5bf8895ab1e1db3e4c4 (diff) | |
download | CMake-a1bb1a47129380421fd9490688502ce5bee2e59f.zip CMake-a1bb1a47129380421fd9490688502ce5bee2e59f.tar.gz CMake-a1bb1a47129380421fd9490688502ce5bee2e59f.tar.bz2 |
ENH: Added optional configuration of data/doc/man dirs. This will be useful for package maintainers.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Source/cmCommands.cxx | 4 | ||||
-rw-r--r-- | Source/cmConfigure.cmake.h.in | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 |
4 files changed, 8 insertions, 21 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index d0c75ed..38cafb6 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -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) diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index ccb2d69..7e4f7b2 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -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); diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 8f1ec76..adf8733 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -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@" diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f073271..45838ba 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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())) |