diff --git a/MyxCMakeConfigVersion.cmake b/MyxCMakeConfigVersion.cmake index c41dfc1..69bd845 100644 --- a/MyxCMakeConfigVersion.cmake +++ b/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "1.99.42") +set(MYX_CMAKE_PACKAGE_VERSION "1.99.43") if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/README.md b/README.md index 5ab211d..fdc39e9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ```cmake if(MYX_CMAKE_USE_SYSTEM) - find_package(MyxCMake 1.99.42 REQUIRED) + find_package(MyxCMake 1.99.43 REQUIRED) else() include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake) endif() diff --git a/VERSION.txt b/VERSION.txt index a4ffe5b..1fbd756 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.99.42 +1.99.43 diff --git a/lib/macro/InstallRelative.cmake b/lib/macro/InstallRelative.cmake new file mode 100644 index 0000000..b10c8b5 --- /dev/null +++ b/lib/macro/InstallRelative.cmake @@ -0,0 +1,21 @@ +#[=======================================================================[.rst: +install_relative +---------------- + +#]=======================================================================] + +macro(install_relative STRIP_DIRECTORY) + 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() +endmacro(install_with_directory) + +