cmake: Exclude empty directories due to headers install

This followed some pointers from here and opted for explicit exclusion:

https://stackoverflow.com/questions/55451084/cmake-files-matching-pattern-copies-empty-directories

Fixes #2422
This commit is contained in:
Arne Welzel 2022-09-23 17:51:01 +02:00
parent aa4031ea22
commit d704b27e81

View file

@ -584,6 +584,12 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
PATTERN "3rdparty/*" EXCLUDE PATTERN "3rdparty/*" EXCLUDE
# The "zeek -> ." symlink isn't needed in the install-tree # The "zeek -> ." symlink isn't needed in the install-tree
REGEX "^${escaped_path}$" EXCLUDE REGEX "^${escaped_path}$" EXCLUDE
# FILES_MATCHING creates empty directories:
# https://gitlab.kitware.com/cmake/cmake/-/issues/17122
# Exclude the ones that this affects explicitly.
PATTERN "script_opt/CPP/maint" EXCLUDE
PATTERN "fuzzers/corpora" EXCLUDE
) )
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/