diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 25574384472..794c14b486d 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -89,6 +89,25 @@ This option also has forms for configuration-specific flags: - `VCPKG_LINKER_FLAGS_DEBUG` - `VCPKG_LINKER_FLAGS_RELEASE` +### VCPKG_CMAKE_CONFIGURE_OPTIONS +Set additional CMake configure options that are appended to the configure command (in [`vcpkg_cmake_configure`](../maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md)). + +This field is optional. + +Also available as build-type specific `VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE` variables. + +### VCPKG_MAKE_CONFIGURE_OPTIONS +Set additional automake / autoconf configure options that are appended to the configure command (in [`vcpkg_configure_make`](../maintainers/vcpkg_configure_make.md)). + +This field is optional. + +For example, to skip certain libtool checks that may errantly fail: +```cmake +set(VCPKG_MAKE_CONFIGURE_OPTIONS "lt_cv_deplibs_check_method=pass_all") +``` + +Also available as build-type specific `VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG` and `VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE` variables. + ### VCPKG_DEP_INFO_OVERRIDE_VARS Replaces the default computed list of triplet "Supports" terms. diff --git a/ports/vcpkg-cmake/vcpkg.json b/ports/vcpkg-cmake/vcpkg.json index 710d38e62d1..8e2ac9ec664 100644 --- a/ports/vcpkg-cmake/vcpkg.json +++ b/ports/vcpkg-cmake/vcpkg.json @@ -1,5 +1,5 @@ { "name": "vcpkg-cmake", "version-date": "2021-02-28", - "port-version": 2 + "port-version": 3 } diff --git a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake index 3b7d31eff37..acc6f365547 100644 --- a/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake +++ b/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake @@ -293,6 +293,17 @@ function(vcpkg_cmake_configure) endif() endforeach() + # Allow overrides / additional configuration variables from triplets + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS) + list(APPEND arg_OPTIONS "${VCPKG_CMAKE_CONFIGURE_OPTIONS}") + endif() + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE) + list(APPEND arg_OPTIONS_RELEASE "${VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE}") + endif() + if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG) + list(APPEND arg_OPTIONS_DEBUG "${VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG}") + endif() + if(ninja_host AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE) list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index 770678394fc..86b42a17348 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -512,6 +512,17 @@ function(vcpkg_configure_make) list(APPEND _csc_OPTIONS --disable-shared --enable-static) endif() + # Can be set in the triplet to append options for configure + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS) + list(APPEND _csc_OPTIONS ${VCPKG_MAKE_CONFIGURE_OPTIONS}) + endif() + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE) + list(APPEND _csc_OPTIONS_RELEASE ${VCPKG_MAKE_CONFIGURE_OPTIONS_RELEASE}) + endif() + if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG) + list(APPEND _csc_OPTIONS_DEBUG ${VCPKG_MAKE_CONFIGURE_OPTIONS_DEBUG}) + endif() + file(RELATIVE_PATH RELATIVE_BUILD_PATH "${CURRENT_BUILDTREES_DIR}" "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}") set(base_cmd) diff --git a/versions/baseline.json b/versions/baseline.json index dac0aa82750..310ed89bab3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6482,7 +6482,7 @@ }, "vcpkg-cmake": { "baseline": "2021-02-28", - "port-version": 2 + "port-version": 3 }, "vcpkg-cmake-config": { "baseline": "2021-05-22", diff --git a/versions/v-/vcpkg-cmake.json b/versions/v-/vcpkg-cmake.json index 561945cd636..1f1fb408b63 100644 --- a/versions/v-/vcpkg-cmake.json +++ b/versions/v-/vcpkg-cmake.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0e8bb94599a00fd9c61fd0ae524c22a067c21420", + "version-date": "2021-02-28", + "port-version": 3 + }, { "git-tree": "02fbd92ab46d1512b22280f1264e4e8f8d076ef4", "version-date": "2021-02-28",