Skip to content
Snippets Groups Projects
Commit 071ce33e authored by Brad King's avatar Brad King
Browse files

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.
parent 31678a3c
No related branches found
No related tags found
No related merge requests found
......@@ -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
#-----------------------------------------------------------------------
# just install the modules
## new file added, force rerunning cmake
SUBDIRS(Platform)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cmake$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cpp$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cxx$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.in$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.c$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.h$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.F$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules readme\\.txt$)
# just install the modules
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules/Platform .*\\.cmake$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Modules/Platform .*\\.in$)
# just install the modules
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.in)
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.txt)
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.cmake$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.dsptemplate$)
INSTALL_FILES(${CMAKE_DATA_DIR}/Templates .*\\.vsmacros$)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment