mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:19:01 +08:00
[libxdf] Add new port (#32816)
* [libxdf] Add new port * [libxdf] Format * [libxdf] Add version stuff * [libxdf] Use vcpkg_install_copyright * [libxdf] Overwrite version * [libxdf] Fix pugixml dependency * [libxdf] Overwrite version * [libxdf] Update to latest commit * [libxdf] Overwrite version * Revert "[libxdf] Overwrite version" This reverts commita9a791bbaf
. Revert "[libxdf] Update to latest commit" This reverts commit834ae8738c
.
This commit is contained in:
parent
980ec0f49d
commit
790f778cb1
65
ports/libxdf/fix-pugixml-dependency.patch
Normal file
65
ports/libxdf/fix-pugixml-dependency.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From ca070dfdd96db5c9eb9a5a88d1193f25b13e01f3 Mon Sep 17 00:00:00 2001
|
||||
From: myd7349 <myd7349@gmail.com>
|
||||
Date: Mon, 31 Jul 2023 23:50:40 +0800
|
||||
Subject: [PATCH] Fix missing pugixml dependency in generated CMake package
|
||||
file
|
||||
|
||||
---
|
||||
CMakeLists.txt | 14 ++++++++++++--
|
||||
libxdfConfig.cmake.in | 9 +++++++++
|
||||
2 files changed, 21 insertions(+), 2 deletions(-)
|
||||
create mode 100644 libxdfConfig.cmake.in
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 98cc03f..42f9a91 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -43,18 +43,28 @@ target_include_directories(xdf PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
+include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
+configure_package_config_file(
|
||||
+ ${CMAKE_CURRENT_LIST_DIR}/libxdfConfig.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/libxdfConfig.cmake
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
+)
|
||||
install(TARGETS xdf
|
||||
- EXPORT "${PROJECT_NAME}Config"
|
||||
+ EXPORT "${PROJECT_NAME}Targets"
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
-install(EXPORT "${PROJECT_NAME}Config"
|
||||
+install(EXPORT "${PROJECT_NAME}Targets"
|
||||
COMPONENT ${PROJECT_NAME}
|
||||
NAMESPACE "XDF::"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxdfConfig.cmake
|
||||
+ COMPONENT ${PROJECT_NAME}
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
+)
|
||||
|
||||
# set(CPACK_STRIP_FILES ON)
|
||||
# set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
diff --git a/libxdfConfig.cmake.in b/libxdfConfig.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..84331f0
|
||||
--- /dev/null
|
||||
+++ b/libxdfConfig.cmake.in
|
||||
@@ -0,0 +1,9 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+
|
||||
+find_dependency(pugixml)
|
||||
+
|
||||
+if(NOT TARGET XDF::xdf)
|
||||
+ include("${CMAKE_CURRENT_LIST_DIR}/libxdfTargets.cmake")
|
||||
+endif()
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
25
ports/libxdf/portfile.cmake
Normal file
25
ports/libxdf/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xdf-modules/libxdf
|
||||
REF "v${VERSION}"
|
||||
SHA512 81ff3598442d3ea166ec54b74248ad7b7eca5fcfdb72526978966398ad9e6524883183e71b68e349c46c2705779bf2b4922ce097f01afe7a62faa449ab8fa075
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-pugixml-dependency.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DXDF_NO_SYSTEM_PUGIXML=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
18
ports/libxdf/vcpkg.json
Normal file
18
ports/libxdf/vcpkg.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "libxdf",
|
||||
"version": "0.99.8",
|
||||
"description": "C++ library for loading multimodal, multi-rate signals stored in XDF files.",
|
||||
"homepage": "https://xdf-modules.github.io/libxdf/",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": [
|
||||
"pugixml",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -4824,6 +4824,10 @@
|
||||
"baseline": "1.1.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"libxdf": {
|
||||
"baseline": "0.99.8",
|
||||
"port-version": 0
|
||||
},
|
||||
"libxdiff": {
|
||||
"baseline": "0.23",
|
||||
"port-version": 3
|
||||
|
9
versions/l-/libxdf.json
Normal file
9
versions/l-/libxdf.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c1a0ecbb62eb5c0d6411498644c94fe08120f3b5",
|
||||
"version": "0.99.8",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user