mirror of https://github.com/microsoft/vcpkg.git
[vcpkg-pkgconfig-get-modules] Turn into proper helper port (#37939)
I wonder if LIBRARIES_DIRS should return a list of directories instead of a list of `-L...` flags. --------- Co-authored-by: Javier Matos <javiermatos@Javiers-Laptop.lan> Co-authored-by: Monica <liuyumei01@beyondsoft.com>
This commit is contained in:
parent
3d5961e8c0
commit
04b0cf2b3f
|
|
@ -1,14 +1,8 @@
|
|||
if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
|
||||
# make FATAL_ERROR in CI when issue #16773 fixed
|
||||
message(WARNING "vcpkg-pkgconfig-get-modules is a host-only port; please mark it as a host port in your dependencies.")
|
||||
endif()
|
||||
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)
|
||||
|
||||
file(COPY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake"
|
||||
"${CURRENT_PORT_DIR}/vcpkg-port-config.cmake"
|
||||
"${CURRENT_PORT_DIR}/x_vcpkg_pkgconfig_get_modules.cmake"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/x_vcpkg_pkgconfig_get_modules.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/x_vcpkg_pkgconfig_get_modules.cmake" @ONLY)
|
||||
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
vcpkg_install_copyright(FILE_LIST "${VCPKG_ROOT_DIR}/LICENSE.txt")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
"name": "vcpkg-pkgconfig-get-modules",
|
||||
"version-date": "2023-09-06",
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"version-date": "2024-04-03",
|
||||
"documentation": "https://learn.microsoft.com/vcpkg/maintainers/functions/vcpkg_pkgconfig_get_modules",
|
||||
"license": "MIT",
|
||||
"supports": "native",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "pkgconf",
|
||||
"host": true,
|
||||
"default-features": false
|
||||
}
|
||||
"pkgconf"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
function(x_vcpkg_pkgconfig_get_modules)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "CFLAGS;LIBS;LIBRARIES;LIBRARIES_DIR;INCLUDE_DIRS;USE_MSVC_SYNTAX_ON_WINDOWS" "PREFIX" "MODULES")
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "CFLAGS;LIBS;LIBRARIES;LIBRARIES_DIR;LIBRARIES_DIRS;INCLUDE_DIRS;USE_MSVC_SYNTAX_ON_WINDOWS" "PREFIX" "MODULES")
|
||||
if(NOT DEFINED arg_PREFIX OR arg_PREFIX STREQUAL "")
|
||||
message(FATAL_ERROR "x_vcpkg_pkgconfig_get_modules requires parameter PREFIX!")
|
||||
endif()
|
||||
if(NOT DEFINED arg_MODULES OR arg_MODULES STREQUAL "")
|
||||
message(FATAL_ERROR "x_vcpkg_pkgconfig_get_modules requires parameter MODULES!")
|
||||
endif()
|
||||
if(arg_LIBRARIES_DIR)
|
||||
# Legacy. Remove in 2025.
|
||||
message(WARNING "x_vcpkg_pkgconfig_get_modules parameter LIBRARIES_DIR is a no-op. Use LIBRARIES_DIRS instead.")
|
||||
endif()
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "extra arguments passed to x_vcpkg_pkgconfig_get_modules: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
|
@ -16,7 +20,7 @@ function(x_vcpkg_pkgconfig_get_modules)
|
|||
set(msvc "--msvc-syntax")
|
||||
endif()
|
||||
|
||||
set(PKGCONFIG "${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf@VCPKG_HOST_EXECUTABLE_SUFFIX@")
|
||||
set(PKGCONFIG "${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
|
||||
set(backup_PKG_CONFIG_PATH "$ENV{PKG_CONFIG_PATH}")
|
||||
|
||||
|
|
|
|||
|
|
@ -9069,7 +9069,7 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"vcpkg-pkgconfig-get-modules": {
|
||||
"baseline": "2023-09-06",
|
||||
"baseline": "2024-04-03",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-qmake": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6845369c8cb7d3c318e8e3ae92fd2b7570a756ca",
|
||||
"version-date": "2024-04-03",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "365f7303c0f9fe13458a62e7e4998760e6d918a4",
|
||||
"version-date": "2023-09-06",
|
||||
|
|
|
|||
Loading…
Reference in New Issue