Installing Files — Mastering CMake
cmake.org › mastering-cmake › chapterinstall(DIRECTORY data/icons DESTINATION share/myproject REGEX "/.git$" EXCLUDE REGEX "/[^/]*.txt$" EXCLUDE) which uses ‘/’ and ‘$’ to constrain the match in the same way as the patterns. Consider a similar case in which the input directory contains shell scripts and text files that we wish to install with different permissions than the other files.
[CMake] Exclude custom install target(s) from all
cmake.org › pipermail › cmake[CMake] Exclude custom install target(s) from all Jeet Sukumaran js473 at duke.edu Fri May 10 20:48:40 EDT 2013. Previous message: [CMake] Thanx for fixing visual studio doing the install even though the build failed Next message: [CMake] Creating a common (= across several projects) CMake module/include-file/library
EXCLUDE_FROM_ALL — CMake 3.18.6 Documentation
cmake.org › cmake › helpWith EXCLUDE_FROM_ALL set to false or not set at all, the target will be brought up to date as part of doing a make install or its equivalent for the CMake generator being used. If a target has EXCLUDE_FROM_ALL set to true, it may still be listed in an install(TARGETS) command, but the user is responsible for ensuring that the target’s build artifacts are not missing or outdated when an install is performed.