[vcpkg.cmake] Partially revert #23134 (#23176)

This commit is contained in:
Robert Schumacher 2022-02-18 15:48:45 -08:00 committed by GitHub
parent b313875bae
commit 5cf60186a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,6 +525,10 @@ foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS)
endif()
endforeach()
cmake_policy(POP)
# Any policies applied to the below macros and functions appear to leak into consumers
function(add_executable)
z_vcpkg_function_arguments(ARGS)
_add_executable(${ARGS})
@ -787,6 +791,9 @@ macro("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_find_package_package_name)
endforeach()
endmacro()
cmake_policy(PUSH)
cmake_policy(VERSION 3.7.2)
set(VCPKG_TOOLCHAIN ON)
set(Z_VCPKG_UNUSED "${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}")
set(Z_VCPKG_UNUSED "${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}")