diff --git a/scripts/cmake/vcpkg_build_nmake.cmake b/scripts/cmake/vcpkg_build_nmake.cmake index 2a251fded6..282e04f5f6 100755 --- a/scripts/cmake/vcpkg_build_nmake.cmake +++ b/scripts/cmake/vcpkg_build_nmake.cmake @@ -128,6 +128,7 @@ function(vcpkg_build_nmake) endif() vcpkg_backup_env_variables(VARS CL) + cmake_path(NATIVE_PATH CURRENT_PACKAGES_DIR NORMALIZE install_dir_native) foreach(build_type IN ITEMS debug release) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL build_type) if(build_type STREQUAL "debug") @@ -136,7 +137,7 @@ function(vcpkg_build_nmake) # Add install command and arguments set(make_opts "${make_opts_base}") if (arg_ENABLE_INSTALL) - vcpkg_list(APPEND make_opts "INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug") + vcpkg_list(APPEND make_opts "INSTALLDIR=${install_dir_native}\\debug") endif() vcpkg_list(APPEND make_opts ${arg_OPTIONS} ${arg_OPTIONS_DEBUG}) set(ENV{CL} "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") @@ -147,7 +148,7 @@ function(vcpkg_build_nmake) # Add install command and arguments set(make_opts "${make_opts_base}") if (arg_ENABLE_INSTALL) - vcpkg_list(APPEND make_opts "INSTALLDIR=${CURRENT_PACKAGES_DIR}") + vcpkg_list(APPEND make_opts "INSTALLDIR=${install_dir_native}") endif() vcpkg_list(APPEND make_opts ${arg_OPTIONS} ${arg_OPTIONS_RELEASE})