2022-10-02 13:23:05 +00:00
|
|
|
#[=======================================================================[.rst:
|
2022-10-08 22:01:31 +00:00
|
|
|
myx_install_relative
|
|
|
|
--------------------
|
2022-10-02 13:23:05 +00:00
|
|
|
|
|
|
|
#]=======================================================================]
|
|
|
|
|
2022-10-08 22:01:31 +00:00
|
|
|
macro(myx_install_relative STRIP_DIRECTORY)
|
2022-10-02 13:23:05 +00:00
|
|
|
set(options)
|
|
|
|
set(oneValueArgs DESTINATION)
|
|
|
|
set(multiValueArgs FILES)
|
|
|
|
|
|
|
|
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
|
|
|
|
foreach(FILE ${ARG_FILES})
|
|
|
|
get_filename_component(DIR ${FILE} DIRECTORY)
|
|
|
|
string(REPLACE ${STRIP_DIRECTORY} "" RELATIVE_DIR ${DIR})
|
|
|
|
INSTALL(FILES ${FILE} DESTINATION ${ARG_DESTINATION}/${RELATIVE_DIR} ${ARG_UNPARSED_ARGUMENTS})
|
|
|
|
endforeach()
|
2022-10-08 22:01:31 +00:00
|
|
|
endmacro(myx_install_relative STRIP_DIRECTORY)
|