2019-09-14 15:10:08 +02:00
|
|
|
#
|
|
|
|
# Installs files with preserving paths.
|
|
|
|
#
|
|
|
|
# Example usage:
|
|
|
|
# install_public_headers_with_directory(MyHeadersList "src/")
|
|
|
|
#
|
|
|
|
macro(install_public_headers_with_directory HEADER_LIST IGNORE_PREFIX)
|
|
|
|
foreach(HEADER ${${HEADER_LIST}})
|
|
|
|
get_filename_component(DIR ${HEADER} DIRECTORY)
|
|
|
|
string(REPLACE ${IGNORE_PREFIX} "" DIR ${DIR})
|
2019-12-29 13:13:34 +01:00
|
|
|
install(
|
|
|
|
FILES ${HEADER}
|
|
|
|
DESTINATION include/${DIR}
|
|
|
|
# We don't want someone by accident modify his installed files
|
|
|
|
PERMISSIONS OWNER_EXECUTE OWNER_READ
|
|
|
|
)
|
2019-09-14 15:10:08 +02:00
|
|
|
endforeach(HEADER)
|
|
|
|
|
|
|
|
endmacro(install_public_headers_with_directory)
|