vcpkg/scripts/cmake/vcpkg_add_to_path.cmake

11 lines
296 B
CMake
Raw Normal View History

2018-08-14 07:07:26 +08:00
function(vcpkg_add_to_path)
cmake_parse_arguments(PARSE_ARGV 0 "arg" "PREPEND" "" "")
if(arg_PREPEND)
set(operation PREPEND)
2018-08-14 07:07:26 +08:00
else()
set(operation APPEND)
2018-08-14 07:07:26 +08:00
endif()
vcpkg_host_path_list("${operation}" ENV{PATH} ${arg_UNPARSED_ARGUMENTS})
endfunction()