Revision f816911dfaef3ea24c2fcbf9c0c3e00bd40ea040 authored by Andrew Adams on 24 August 2020, 18:10:42 UTC, committed by Andrew Adams on 24 August 2020, 18:10:42 UTC
1 parent 5dea096
Raw File
MakeShellPath.cmake
##
# Convenience function for creating shell paths
##

function(make_shell_path OUTVAR)
    if (WIN32)
        set(SEP "\\$<SEMICOLON>")
    else ()
        set(SEP ":")
    endif ()

    list(TRANSFORM ARGN REPLACE "^(.+)$" "$<SHELL_PATH:\\1>")
    string(REPLACE ";" "${SEP}" ARGN "${ARGN}")
    set(${OUTVAR} "${ARGN}" PARENT_SCOPE)
endfunction()
back to top