mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[libcaer,dv-processing] Port fixes, cleanup (#30098)
* [libcaer] Fix libusb dependency, cleanup * [dv-processing] Fix config race, cleanup * Add tools feature [skip actions] * WIP [skip actions] * WIP [skip actions] * Finish changes * Fix comment * CR requests
This commit is contained in:
parent
f9a27e08b3
commit
54bf862901
5
ports/dv-processing/cmake-project-include.cmake
Normal file
5
ports/dv-processing/cmake-project-include.cmake
Normal file
@ -0,0 +1,5 @@
|
||||
if(MSVC)
|
||||
# This port's tools use C++20, but Qt6 (via OpenCV4) uses C++17.
|
||||
# Assuming that no coroutines are passed between the two.
|
||||
add_definitions(-D_ALLOW_COROUTINE_ABI_MISMATCH)
|
||||
endif()
|
@ -15,27 +15,37 @@ vcpkg_from_gitlab(
|
||||
SHA512 e7907b1be9d85b02e1a1703cf001765119a7d07b1873148a0fbfe6945c519d85b1f9bc66b24f90d88759c2b32965304e1639f2ff136448be64fc88f81a0d4c2d
|
||||
HEAD_REF ec53dae89f6b037e9e640af5340d7bf67d84d278
|
||||
)
|
||||
|
||||
file(GLOB CMAKEMOD_FILES "${CMAKEMOD_SOURCE_PATH}/*")
|
||||
file(COPY ${CMAKEMOD_FILES} DESTINATION "${SOURCE_PATH}/cmake/modules")
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools ENABLE_UTILITIES
|
||||
)
|
||||
|
||||
set(VCPKG_BUILD_TYPE release) # no lib binaries
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE # writes to include/dv-processing/version.hpp
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_lz4=ON
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_zstd=ON
|
||||
-DENABLE_TESTS=OFF
|
||||
-DENABLE_SAMPLES=OFF
|
||||
-DENABLE_PYTHON=OFF
|
||||
-DENABLE_UTILITIES=OFF
|
||||
-DBUILD_CONFIG_VCPKG=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME "dv-processing" CONFIG_PATH "share/dv-processing")
|
||||
if(ENABLE_UTILITIES)
|
||||
vcpkg_copy_tools(TOOL_NAMES dv-filestat dv-imu-bias-estimation dv-list-devices dv-tcpstat AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") # pkgconfig only, but incomplete
|
||||
|
||||
vcpkg_fixup_pkgconfig(SKIP_CHECK)
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
6
ports/dv-processing/usage
Normal file
6
ports/dv-processing/usage
Normal file
@ -0,0 +1,6 @@
|
||||
dv-processing provides CMake targets:
|
||||
|
||||
find_package(dv-processing CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE dv::processing)
|
||||
|
||||
Using dv-processing requires a C++20 compliant compiler.
|
@ -1,34 +1,46 @@
|
||||
{
|
||||
"name": "dv-processing",
|
||||
"version": "1.7.8",
|
||||
"description": "Generic algorithms for event cameras.",
|
||||
"port-version": 1,
|
||||
"description": "Generic algorithms for event cameras. (C++20 required.)",
|
||||
"homepage": "https://gitlab.com/inivation/dv/dv-processing",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": [
|
||||
"boost-algorithm",
|
||||
{
|
||||
"name": "boost-asio",
|
||||
"features": [
|
||||
"ssl"
|
||||
]
|
||||
},
|
||||
"boost-callable-traits",
|
||||
"boost-circular-buffer",
|
||||
"boost-core",
|
||||
"boost-endian",
|
||||
"boost-geometry",
|
||||
"boost-lockfree",
|
||||
"boost-nowide",
|
||||
"boost-property-tree",
|
||||
"boost-stacktrace",
|
||||
"boost-tti",
|
||||
"cli11",
|
||||
"eigen3",
|
||||
"fmt",
|
||||
"libcaer",
|
||||
"lz4",
|
||||
"opencv4",
|
||||
{
|
||||
"name": "opencv4",
|
||||
"default-features": false
|
||||
},
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib",
|
||||
"zstd"
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build CLI utilities"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
17
ports/libcaer/fix-libusb.diff
Normal file
17
ports/libcaer/fix-libusb.diff
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/cmakemod/libcaerConfig.cmake.in b/cmakemod/libcaerConfig.cmake.in
|
||||
index cdf9f88..475d543 100644
|
||||
--- a/cmakemod/libcaerConfig.cmake.in
|
||||
+++ b/cmakemod/libcaerConfig.cmake.in
|
||||
@@ -21,6 +21,12 @@
|
||||
CMAKE_POLICY(PUSH)
|
||||
CMAKE_POLICY(VERSION 3.10)
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+if(NOT "@CC_MSVC@")
|
||||
+ find_dependency(PkgConfig)
|
||||
+ pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)
|
||||
+endif()
|
||||
+
|
||||
INCLUDE(@PACKAGE_export_destination@/libcaer-exports.cmake)
|
||||
SET(libcaer_INCLUDE_DIRS @PACKAGE_include_dirs@)
|
||||
|
@ -5,11 +5,13 @@ vcpkg_from_gitlab(
|
||||
REF 933dfa60a138091afb03014f8c24183bab7bba4e
|
||||
SHA512 f3ac74bb4cfc4077e5a226307f66a9b8b263201d2342d9e61ee98a23f95e7897895da9f148b4e910535779f779a26f5c192925386a99a70e9d22540a5421d646
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-libusb.diff
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
DISABLE_PARALLEL_CONFIGURE # writes to include/libcaer/libcaer.h
|
||||
OPTIONS
|
||||
-DENABLE_OPENCV=ON
|
||||
-DEXAMPLES_INSTALL=OFF
|
||||
@ -18,8 +20,9 @@ vcpkg_cmake_configure(
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME "libcaer" CONFIG_PATH "share/libcaer")
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,13 +1,16 @@
|
||||
{
|
||||
"name": "libcaer",
|
||||
"version-date": "2022-07-25",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "Minimal C library to access, configure and get data from neuromorphic sensors and processors.",
|
||||
"homepage": "https://gitlab.com/inivation/dv/libcaer",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": [
|
||||
"libusb",
|
||||
"opencv4",
|
||||
{
|
||||
"name": "opencv4",
|
||||
"default-features": false
|
||||
},
|
||||
"pkgconf",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
@ -2154,7 +2154,7 @@
|
||||
},
|
||||
"dv-processing": {
|
||||
"baseline": "1.7.8",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"dx": {
|
||||
"baseline": "1.0.1",
|
||||
@ -3774,7 +3774,7 @@
|
||||
},
|
||||
"libcaer": {
|
||||
"baseline": "2022-07-25",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"libcanberra": {
|
||||
"baseline": "0.30",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8b60bb354ea9ab03a96d4ab7c0c51bca9580cf72",
|
||||
"version": "1.7.8",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "0ea0c583d83278f6190e7d0734425c65347555d8",
|
||||
"version": "1.7.8",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "131181ae3b3608e511cf7db3c3091612b8af0e03",
|
||||
"version-date": "2022-07-25",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "ccbe6ec937f8f140cd99fb3a88b7afcb65ad3389",
|
||||
"version-date": "2022-07-25",
|
||||
|
Loading…
x
Reference in New Issue
Block a user