Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
12 changes: 4 additions & 8 deletions scripts/cmake/vcpkg_check_features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,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 @@ -76,9 +75,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 @@ -98,9 +96,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 @@ -120,9 +117,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 scripts/cmake/vcpkg_find_fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vcpkg_find_fortran(<out_var>)
```cmake
vcpkg_find_fortran(fortran_args)
# ...
vcpkg_configure_cmake(...
vcpkg_cmake_configure(...
OPTIONS
${fortran_args}
)
Expand Down