~aleteoryx/muditaos

ref: 0f2503e76d95868bd3b4df91cd3b68b054c8e87f muditaos/config/Utils.cmake -rw-r--r-- 605 bytes
0f2503e7 — Kuba [EGD-4859] Add call forwarding parser 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
# An equivalent of install() which allows to declare multiple components using
# a custom 'COMPONENTS' clause. This clause must be the last on the
# argument list. The original 'COMPONENT' from install() clause must not appear
# on the argument list.  
function(multicomp_install)
    list(FIND ARGN "COMPONENTS" CLAUSE_INDEX)
    list(SUBLIST ARGN 0 ${CLAUSE_INDEX} INSTALL_ARGN)
    math(EXPR COMPS_INDEX "${CLAUSE_INDEX}+1")
    list(SUBLIST ARGN ${COMPS_INDEX} ${ARGC} COMPONENTS)
    foreach(COMP IN LISTS COMPONENTS)
        install(${INSTALL_ARGN} COMPONENT ${COMP})
    endforeach()
endfunction()