PUBLIC_HEADER like-feature which preserves directory structure of files on INSTALL. It currently flattens them all into single directory.
Currently the best way to ensure hierarchy is preserved is to use:-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/includes/"
DESTINATION "include"
FILES_MATCHING
PATTERN "*.h*"
)
It would be nice if PUBLIC_HEADER
could preserve directory structure.
If backward compatibility is of importance, we could have PUBLIC_HEADER_DIR
or PUBLIC_HEADER_HIERARCHY
instead which would allow us to write
set_target_properties(${TARGET} PROPERTIES PUBLIC_HEADER "${NEW_INCLUDE_FILES_TO_CONSIDER}")
It would be nice if the same feature could be added to target_include_directories
so neither would be needed.