diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 1c3a26a74d..c31955fb25 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -72,14 +72,11 @@ function(vcpkg_configure_cmake) endif() if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) else() set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() - else() - set(_PATHSEP ":") endif() set(NINJA_CAN_BE_USED ON) # Ninja as generator @@ -154,7 +151,7 @@ function(vcpkg_configure_cmake) if(GENERATOR STREQUAL "Ninja") vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") + vcpkg_add_to_path("${NINJA_PATH}") list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") endif() @@ -265,7 +262,7 @@ function(vcpkg_configure_cmake) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") + vcpkg_add_to_path("${NINJA_PATH}") #parallelize the configure step set(_contents