Skip to content

Commit

Permalink
[restc-cpp] use modern cmake helpers (#29016)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort committed Jan 18, 2023
1 parent 3f18689 commit 6b1f3c0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
15 changes: 8 additions & 7 deletions ports/restc-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
boost-log RESTC_CPP_LOG_WITH_BOOST_LOG
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
WINDOWS_USE_MSBUILD
OPTIONS
-DINSTALL_RAPIDJSON_HEADERS=OFF
-DRESTC_CPP_WITH_EXAMPLES=OFF
Expand All @@ -28,12 +29,12 @@ vcpkg_configure_cmake(
${FEATURE_OPTIONS}
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
12 changes: 10 additions & 2 deletions ports/restc-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "restc-cpp",
"version-semver": "0.10.0",
"port-version": 1,
"port-version": 2,
"description": "Modern C++ REST Client library",
"homepage": "https://github.com/jgaa/restc-cpp",
"license": "MIT",
Expand All @@ -15,7 +15,15 @@
"boost-program-options",
"boost-system",
"boost-uuid",
"rapidjson"
"rapidjson",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"openssl",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6718,7 +6718,7 @@
},
"restc-cpp": {
"baseline": "0.10.0",
"port-version": 1
"port-version": 2
},
"restclient-cpp": {
"baseline": "2022-02-09",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/restc-cpp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2e57eacc4df802951e1ae319194becc2bc3e0fb4",
"version-semver": "0.10.0",
"port-version": 2
},
{
"git-tree": "98f2e4aed1e4c9a84df72116c4036a59a3d59436",
"version-semver": "0.10.0",
Expand Down

0 comments on commit 6b1f3c0

Please sign in to comment.