From 5c3567b5bceb6937c938ec70e6ac6be289864f20 Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Wed, 2 Mar 2022 00:23:01 +0100 Subject: [PATCH] [new-port-template] Remove deprecated cmake (#23283) * Remove deprecated cmake from templates * Fix / * Comment about vcpkg_cmake_config_fixup --- scripts/templates/portfile.in.cmake | 18 +++++++++++------- scripts/templates/vcpkg.json.in | 7 ++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 8679c6104d..2ca68351a5 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -56,19 +56,23 @@ vcpkg_extract_source_archive_ex( # tbb ROCKSDB_IGNORE_PACKAGE_TBB # ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 ) -vcpkg_install_cmake() +vcpkg_cmake_install() # # Moves all .cmake files from /debug/share/@PORT@/ to /share/@PORT@/ -# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details -# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/@PORT@) +# # See /docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md for more details +# When you uncomment "vcpkg_cmake_config_fixup()", you need to add the following to "dependencies" vcpkg.json: +#{ +# "name": "vcpkg-cmake-config", +# "host": true +#} +# vcpkg_cmake_config_fixup(CONFIG_PATH cmake TARGET_PATH share/@PORT@) # # Handle copyright -# 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) diff --git a/scripts/templates/vcpkg.json.in b/scripts/templates/vcpkg.json.in index 2e217387e7..15fcaa1677 100644 --- a/scripts/templates/vcpkg.json.in +++ b/scripts/templates/vcpkg.json.in @@ -3,7 +3,12 @@ "version-string": "", "homepage": "", "description": "", - "dependencies": [], + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], "default-features": [], "features": [