mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[vcpkg|toolchain] add VCPKG_OVERLAY_(PORTS|TRIPLETS) to the toolchain (#13240)
* add VCPKG_OVERLAY_(PORTS|TRIPLETS) to the toolchain * move everything into additional manifest params * fix me not thinking
This commit is contained in:
parent
18ab4b72a2
commit
59115f6e3a
@ -329,15 +329,31 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT _CMAKE_IN_TRY_COMPILE)
|
||||
message(STATUS "Bootstrapping vcpkg before install - done")
|
||||
endif()
|
||||
|
||||
set(VCPKG_OVERLAY_PORTS "" CACHE STRING "Overlay ports to use for vcpkg install in manifest mode")
|
||||
mark_as_advanced(VCPKG_OVERLAY_PORTS)
|
||||
set(VCPKG_OVERLAY_TRIPLETS "" CACHE STRING "Overlay triplets to use for vcpkg install in manifest mode")
|
||||
mark_as_advanced(VCPKG_OVERLAY_TRIPLETS)
|
||||
|
||||
message(STATUS "Running vcpkg install")
|
||||
|
||||
set(_VCPKG_MANIFEST_FEATURES)
|
||||
set(_VCPKG_ADDITIONAL_MANIFEST_PARAMS)
|
||||
if(VCPKG_OVERLAY_PORTS)
|
||||
foreach(_overlay_port IN LISTS VCPKG_OVERLAY_PORTS)
|
||||
list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-ports=${_overlay_port}")
|
||||
endforeach()
|
||||
endif()
|
||||
if(VCPKG_OVERLAY_TRIPLETS)
|
||||
foreach(_overlay_triplet IN LISTS VCPKG_OVERLAY_TRIPLETS)
|
||||
list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-triplets=${_overlay_triplet}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
foreach(feature ${VCPKG_MANIFEST_FEATURES})
|
||||
list(APPEND _VCPKG_MANIFEST_FEATURES "--x-feature=${feature}")
|
||||
list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-feature=${feature}")
|
||||
endforeach()
|
||||
|
||||
if(VCPKG_MANIFEST_NO_DEFAULT_FEATURES)
|
||||
set(_VCPKG_MANIFEST_NO_DEFAULT_FEATURES "--x-no-default-features")
|
||||
list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-no-default-features")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
@ -346,8 +362,7 @@ if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT _CMAKE_IN_TRY_COMPILE)
|
||||
--vcpkg-root "${_VCPKG_ROOT_DIR}"
|
||||
"--x-manifest-root=${_VCPKG_MANIFEST_DIR}"
|
||||
"--x-install-root=${_VCPKG_INSTALLED_DIR}"
|
||||
${_VCPKG_MANIFEST_FEATURES}
|
||||
${_VCPKG_MANIFEST_NO_DEFAULT_FEATURES}
|
||||
${_VCPKG_ADDITIONAL_MANIFEST_PARAMS}
|
||||
RESULT_VARIABLE _VCPKG_INSTALL_RESULT)
|
||||
|
||||
if (NOT _VCPKG_INSTALL_RESULT EQUAL 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user