Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into python3-3.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoikas committed Feb 19, 2022
2 parents c29d9f8 + 5cf6018 commit 8a7a36a
Show file tree
Hide file tree
Showing 90 changed files with 1,452 additions and 288 deletions.
11 changes: 4 additions & 7 deletions docs/examples/packaging-github-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,12 @@ The important parts to update are `REPO` for the GitHub repository path, `REF` f
Finally, we configure the project with CMake, install the package, and copy over the license file:

```cmake
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright)
vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH})
vcpkg_cmake_install()
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libogg" RENAME copyright)
```

Check the documentation for [`vcpkg_configure_cmake`](../maintainers/vcpkg_configure_cmake.md) and [`vcpkg_install_cmake`](../maintainers/vcpkg_install_cmake.md) if your package needs additional options.
Check the documentation for [`vcpkg_cmake_configure`](../maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md) and [`vcpkg_cmake_install`](../maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md) if your package needs additional options.

Now you can run `vcpkg install libogg` to build and install the package.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/patching.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ vcpkg_extract_source_archive_ex(
"use-abort-on-all-platforms.patch"
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
...
```

Expand Down
11 changes: 4 additions & 7 deletions docs/maintainers/maintainer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,15 @@ Examples: [abseil](../../ports/abseil/portfile.cmake)

### Choose either static or shared binaries

By default, `vcpkg_configure_cmake()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`,
By default, `vcpkg_cmake_configure()` will pass in the appropriate setting for `BUILD_SHARED_LIBS`,
however for libraries that don't respect that variable, you can switch on `VCPKG_LIBRARY_LINKAGE`:

```cmake
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC}
-DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED}
Expand All @@ -207,9 +206,8 @@ else()
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON)
endif()
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB}
)
Expand All @@ -223,9 +221,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"zlib" CMAKE_DISABLE_FIND_PACKAGE_ZLIB
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ and applies a rather simply correction which in some cases will yield the wrong
## How it Works

1. Moves `/debug/<CONFIG_PATH>/*targets-debug.cmake` to `/share/${PACKAGE_NAME}`.
2. Removes `/debug/<CONFIG_PATH>/*config.cmake`.
3. Transform all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows.
4. Transform all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms.
5. Fixes `${_IMPORT_PREFIX}` in auto generated targets.
6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets.
2. Transforms all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows.
3. Transforms all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms.
4. Fixes `${_IMPORT_PREFIX}` in auto generated targets.
5. Replaces `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs.
6. Merges INTERFACE_LINK_LIBRARIES of release and debug configurations.
7. Replaces `${CURRENT_INSTALLED_DIR}` with `${VCPKG_IMPORT_PREFIX}` in targets.
8. Removes `/debug/<CONFIG_PATH>/*config.cmake`.

## Examples

Expand Down
12 changes: 4 additions & 8 deletions docs/maintainers/vcpkg_check_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
secure MI_SECURE
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
# Expands to "-DMI_SEE_ASM=ON;-DMI_OVERRIDE=OFF;-DMI_SECURE=ON"
${FEATURE_OPTIONS}
Expand All @@ -77,9 +76,8 @@ vcpkg_check_features(
websockets CPPREST_EXCLUDE_WEBSOCKETS
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
# Expands to "-DCPPREST_EXCLUDE_BROTLI=ON;-DCPPREST_EXCLUDE_WEBSOCKETS=OFF"
${FEATURE_OPTIONS}
Expand All @@ -99,9 +97,8 @@ vcpkg_check_features(
cuda BUILD_GPU
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
# Expands to "-DWITH_CUDA=ON;-DBUILD_CUDA=ON;-DBUILD_GPU=ON"
${FEATURE_OPTIONS}
Expand All @@ -121,9 +118,8 @@ vcpkg_check_features(
tbb ROCKSDB_IGNORE_PACKAGE_TBB
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
# Expands to "-DWITH_TBB=ON;-DROCKSDB_IGNORE_PACKAGE_TBB=OFF"
${FEATURE_OPTIONS}
Expand Down
2 changes: 1 addition & 1 deletion docs/maintainers/vcpkg_find_fortran.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vcpkg_find_fortran(<out_var>)
```cmake
vcpkg_find_fortran(fortran_args)
# ...
vcpkg_configure_cmake(...
vcpkg_cmake_configure(...
OPTIONS
${fortran_args}
)
Expand Down
4 changes: 2 additions & 2 deletions ports/apsi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "apsi",
"version-semver": "0.7.0",
"port-version": 1,
"port-version": 2,
"description": "APSI is a research library for asymmetric private set intersection.",
"homepage": "https://github.com/microsoft/APSI",
"supports": "static",
"supports": "static & !(arm & osx)",
"dependencies": [
"flatbuffers",
"jsoncpp",
Expand Down
2 changes: 1 addition & 1 deletion ports/arrow/all.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
index cd8290d1b..12c52c184 100644
index 391c43e0a..50f6d3d3c 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -427,7 +427,7 @@ function(ADD_ARROW_LIB LIB_NAME)
Expand Down
Loading

0 comments on commit 8a7a36a

Please sign in to comment.