mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 14:58:00 +08:00
[vcpkg-cmake] Search for binaries after manifest-based installs (#16605)
Otherwise, find_package() fails to find any binaries for many manifest installed packages until a second cmake run commences. Fixes #16604
This commit is contained in:
parent
c47216ac79
commit
0dc27b9b67
@ -546,15 +546,6 @@ set(CMAKE_SYSTEM_IGNORE_PATH
|
||||
"C:/OpenSSL-Win64/lib/VC/static"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools")
|
||||
file(GLOB Z_VCPKG_TOOLS_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*")
|
||||
foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS)
|
||||
if(IS_DIRECTORY "${Z_VCPKG_TOOLS_DIR}")
|
||||
list(APPEND CMAKE_PROGRAM_PATH "${Z_VCPKG_TOOLS_DIR}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
# CMAKE_EXECUTABLE_SUFFIX is not yet defined
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg.exe")
|
||||
@ -655,6 +646,14 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT Z_VCPKG_CMAKE_IN_TRY_C
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_PROGRAM_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools")
|
||||
file(GLOB Z_VCPKG_TOOLS_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*")
|
||||
foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS)
|
||||
if(IS_DIRECTORY "${Z_VCPKG_TOOLS_DIR}")
|
||||
list(APPEND CMAKE_PROGRAM_PATH "${Z_VCPKG_TOOLS_DIR}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
function(add_executable)
|
||||
z_vcpkg_function_arguments(ARGS)
|
||||
_add_executable(${ARGS})
|
||||
|
Loading…
x
Reference in New Issue
Block a user