[qmake] Check build type for debug/release (#21650)

This commit is contained in:
itsmattkc 2021-11-26 01:16:15 -08:00 committed by GitHub
parent cb4c366fb6
commit 22cd7265e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,12 @@ function(vcpkg_build_qmake)
set(path_suffix_release "")
set(targets_release "${arg_RELEASE_TARGETS}")
foreach(build_type IN ITEMS debug release)
if(NOT DEFINED VCPKG_BUILD_TYPE)
set(items debug release)
else()
set(items release)
endif()
foreach(build_type IN ITEMS ${items})
set(current_installed_prefix "${CURRENT_INSTALLED_DIR}${path_suffix_${build_type}}")
vcpkg_add_to_path(PREPEND "${current_installed_prefix}/lib" "${current_installed_prefix}/bin")