From e86ff2cc54bda9e9ee322ab69141e7113d5c40a9 Mon Sep 17 00:00:00 2001 From: Vinny Date: Mon, 7 Oct 2019 13:31:39 -0400 Subject: Update vcpkg create template (#8427) * Began updating * Added 'Homepage:' to CONTROL, added vcpkg_check_features to vcpkg_create template * Update portfile.in.cmake Added documentation link for vcpkg_check_features --- scripts/templates/CONTROL.in | 1 + scripts/templates/portfile.in.cmake | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'scripts/templates') diff --git a/scripts/templates/CONTROL.in b/scripts/templates/CONTROL.in index c5b706861..e22cefdce 100644 --- a/scripts/templates/CONTROL.in +++ b/scripts/templates/CONTROL.in @@ -1,3 +1,4 @@ Source: @PORT@ Version: +Homepage: Description: \ No newline at end of file diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 33f8a4853..f6003a0cf 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -9,8 +9,10 @@ # VCPKG_ROOT_DIR = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md -include(vcpkg_common_functions) +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") vcpkg_download_distfile(ARCHIVE URLS "@URL@" @@ -30,6 +32,15 @@ vcpkg_extract_source_archive_ex( # 002_more_port_fixes.patch ) +# # Check if one or more features are a part of a package installation. +# # See /docs/maintainers/vcpkg_check_features.md for more details +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used +# tbb WITH_TBB +# INVERTED_FEATURES +# tbb ROCKSDB_IGNORE_PACKAGE_TBB +# ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -40,8 +51,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Handle copyright +# # 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@) + +# # Handle copyright # file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) -# Post-build test for cmake libraries +# # Post-build test for cmake libraries # vcpkg_test_cmake(PACKAGE_NAME @PORT@) -- cgit v1.2.3 From c784f08ee032dc28c4b5d15ab782d0198d3d0f0c Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 7 Oct 2019 20:07:26 -0700 Subject: update templates. --- scripts/templates/CONTROL.in | 8 +++++++- scripts/templates/portfile.in.cmake | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'scripts/templates') diff --git a/scripts/templates/CONTROL.in b/scripts/templates/CONTROL.in index e22cefdce..77f287e0a 100644 --- a/scripts/templates/CONTROL.in +++ b/scripts/templates/CONTROL.in @@ -1,4 +1,10 @@ Source: @PORT@ Version: Homepage: -Description: \ No newline at end of file +Description: +Build-Depends: +Default-Features: + +Feature: +Description: +Build-Depends: \ No newline at end of file diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index f6003a0cf..6081c6b19 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -2,12 +2,24 @@ # CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads # PORT = current port name (zlib, etc) # TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) # VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) # VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) # VCPKG_ROOT_DIR = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# VCPKG_CMAKE_SYSTEM_NAME = "WindowsStore" "WindowsPhone" "Linux" "Darwin" "Windows" "FreeBSD" empty(windows) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX # # See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md -- cgit v1.2.3 From bc80d3c00ef99709fff6bab059b3b87090c92e58 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 7 Oct 2019 20:10:46 -0700 Subject: use macros VCPKG_TARGET_IS_ instead of VCPKG_CMAKE_SYSTEM_NAME --- scripts/templates/portfile.in.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/templates') diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 6081c6b19..62c53a6db 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -10,13 +10,18 @@ # VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) # VCPKG_ROOT_DIR = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# VCPKG_CMAKE_SYSTEM_NAME = "WindowsStore" "WindowsPhone" "Linux" "Darwin" "Windows" "FreeBSD" empty(windows) # VCPKG_TOOLCHAIN = ON OFF # TRIPLET_SYSTEM_ARCH = arm x86 x64 # BUILD_ARCH = "Win32" "x64" "ARM" # MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} # DEBUG_CONFIG = "Debug Static" "Debug Dll" # RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID # VCPKG_TARGET_EXECUTABLE_SUFFIX # VCPKG_TARGET_STATIC_LIBRARY_SUFFIX # VCPKG_TARGET_SHARED_LIBRARY_SUFFIX -- cgit v1.2.3