mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 02:42:48 +08:00
Pass native install dir to nmake (#22095)
This commit is contained in:
parent
6dbe00f6c4
commit
4b1c874451
@ -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})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user