diff options
author | Brad King <brad.king@kitware.com> | 2009-07-24 17:17:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-24 17:17:41 (GMT) |
commit | 071ce33ec98fd6eac3345d23de76822643611083 (patch) | |
tree | 0a7ff011c5c0882be75bc2e432b848bf048e1aa2 /CMakeLists.txt | |
parent | 31678a3c27aecbaac8b292874b0aa0c815f056e3 (diff) | |
download | CMake-071ce33ec98fd6eac3345d23de76822643611083.zip CMake-071ce33ec98fd6eac3345d23de76822643611083.tar.gz CMake-071ce33ec98fd6eac3345d23de76822643611083.tar.bz2 |
ENH: Install all Modules and Templates
This removes the file-wise installation rules for Modules and Templates
and instead installs the whole directories. This approach is much less
error-prone. The old approach was left from before CMake had the
install(DIRECTORY) command.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b1ca6fb..d32c442 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,6 +374,7 @@ SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION}" CACHE STRING SET(CMAKE_MAN_DIR "/man" CACHE STRING "Install location for man pages (relative to prefix).") MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) +STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}") # include special compile flags for some compilers INCLUDE(CompileFlags.cmake) @@ -465,8 +466,6 @@ MARK_AS_ADVANCED(CMAKE_STRICT) # build the remaining subdirectories SUBDIRS(Source) -SUBDIRS(Modules) -SUBDIRS(Templates) SUBDIRS(Utilities) SUBDIRS(Tests) @@ -474,6 +473,20 @@ SUBDIRS(Tests) ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" --system-information -G "${CMAKE_TEST_GENERATOR}" ) +# Install script directories. +INSTALL( + DIRECTORY Modules Templates + DESTINATION "${CMake_DATA_DEST}" + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE + PATTERN "*.sh.in" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE + PATTERN "CVS" EXCLUDE + ) + #----------------------------------------------------------------------- # End of the main section of the CMakeLists file #----------------------------------------------------------------------- |