Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg-tool] Allow overriding FETCHCONTENT_FULLY_DISCONNECTED #28489

Merged
merged 11 commits into from
Jan 18, 2023
2 changes: 1 addition & 1 deletion ports/vcpkg-cmake/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vcpkg-cmake",
"version-date": "2022-10-30",
"version-date": "2022-12-22",
"documentation": "https://vcpkg.io/en/docs/maintainers/ports/vcpkg-cmake.html",
"license": "MIT"
}
5 changes: 4 additions & 1 deletion ports/vcpkg-cmake/vcpkg_cmake_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ function(vcpkg_cmake_configure)
"-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}"
"-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}"
"-DVCPKG_MANIFEST_INSTALL=OFF"
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
)

# Sets configuration variables for macOS builds
Expand All @@ -195,6 +194,10 @@ function(vcpkg_cmake_configure)
endif()
endforeach()

if(NOT "-DFETCHCONTENT_FULLY_DISCONNECTED=OFF" IN_LIST arg_OPTIONS)
vcpkg_list(APPEND arg_OPTIONS "-DFETCHCONTENT_FULLY_DISCONNECTED=ON")
endif()

# Allow overrides / additional configuration variables from triplets
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS)
vcpkg_list(APPEND arg_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS})
Expand Down
5 changes: 4 additions & 1 deletion scripts/cmake/vcpkg_configure_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,16 @@ function(vcpkg_configure_cmake)
"-DZ_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}"
"-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}"
"-DVCPKG_MANIFEST_INSTALL=OFF"
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
)

if(NOT "${generator_arch}" STREQUAL "")
vcpkg_list(APPEND arg_OPTIONS "-A${generator_arch}")
endif()

if(NOT "-DFETCHCONTENT_FULLY_DISCONNECTED=OFF" IN_LIST arg_OPTIONS)
vcpkg_list(APPEND arg_OPTIONS "-DFETCHCONTENT_FULLY_DISCONNECTED=ON")
endif()

# Sets configuration variables for macOS builds
foreach(config_var IN ITEMS INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES)
if(DEFINED "VCPKG_${config_var}")
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7825,7 +7825,7 @@
"port-version": 0
},
"vcpkg-cmake": {
"baseline": "2022-10-30",
"baseline": "2022-12-22",
"port-version": 0
},
"vcpkg-cmake-config": {
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-cmake.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c36da1395054163a8caebd6b80ef464e1d33a451",
"version-date": "2022-12-22",
"port-version": 0
},
{
"git-tree": "063c28b7401ba0090497ba7b0931b2eb09b18a24",
"version-date": "2022-10-30",
Expand Down