cmake_minimum_required ( VERSION 3.28 )
macro(my_install)
set(options OPTIONAL FAST)
set(oneValueArgs DESTINATION RENAME)
set(multiValueArgs TARGETS CONFIGURATIONS)
cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )
endmacro()
project ( testprj )
my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub CONFIGURATIONS)
message( STATUS "MY_INSTALL_OPTIONAL=${MY_INSTALL_OPTIONAL}" )
message( STATUS "MY_INSTALL_FAST=${MY_INSTALL_FAST}" )
message( STATUS "MY_INSTALL_DESTINATION=${MY_INSTALL_DESTINATION}" )
message( STATUS "MY_INSTALL_RENAME=${MY_INSTALL_RENAME}" )
message( STATUS "MY_INSTALL_TARGETS=${MY_INSTALL_TARGETS}" )
message( STATUS "MY_INSTALL_CONFIGURATIONS=${MY_INSTALL_CONFIGURATIONS}" )
message( STATUS "MY_INSTALL_UNPARSED_ARGUMENTS=${MY_INSTALL_UNPARSED_ARGUMENTS}" )
message( STATUS "MY_INSTALL_KEYWORDS_MISSING_VALUES=${MY_INSTALL_KEYWORDS_MISSING_VALUES}" )