From 4b1c874451b0fe64ab5674452bdf29926a75cbc4 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 20 Dec 2021 17:34:01 +0100 Subject: [PATCH] Pass native install dir to nmake (#22095) --- scripts/cmake/vcpkg_build_nmake.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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})