mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[libusb] Fix issue to support linux (#9561)
* [libusb] support linux * Add Supports * Using vcpkg_configure_make instead * Revert to install headers in windows * Fix failures in libftd1 * Update treehopper * Add failed ports in ci baseline file * Revert to remove azure-kinect-sensor-sdk:x64-windows-static=fail in baseline file * Resolve conflicts Co-authored-by: PhoebeHui <v-phma@microsoft.com>
This commit is contained in:
parent
0babd2ff24
commit
a2d3782198
@ -1,4 +1,4 @@
|
||||
Source: libftdi1
|
||||
Version: 1.4
|
||||
Version: 1.4-1
|
||||
Build-Depends: libusb
|
||||
Description: FTDI USB driver with bitbang mode (v1.4)
|
||||
|
@ -1,5 +1,3 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2"
|
||||
FILENAME "libftdi1-1.4.tar.bz2"
|
||||
@ -26,7 +24,6 @@ vcpkg_configure_cmake(
|
||||
-DEXAMPLES=OFF
|
||||
-DPYTHON_BINDINGS=OFF
|
||||
-DLINK_PYTHON_LIBRARY=OFF
|
||||
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Confuse=ON
|
||||
@ -41,7 +38,10 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libftdi1 TARGET_PATH share/libft
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libftdi1)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libftdi1/LICENSE ${CURRENT_PACKAGES_DIR}/share/libftdi1/copyright)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,4 +1,5 @@
|
||||
Source: libusb
|
||||
Version: 1.0.23
|
||||
Version: 1.0.23-1
|
||||
Homepage: https://github.com/libusb/libusb
|
||||
Description: a cross-platform library to access USB devices
|
||||
Supports: !uwp
|
||||
|
@ -1,8 +1,6 @@
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME)
|
||||
message(FATAL_ERROR "Error: the port is unsupported on your platform. Please open an issue on github.com/Microsoft/vcpkg to request a fix")
|
||||
endif()
|
||||
vcpkg_fail_port_install(ON_TARGET "uwp")
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
message("${PORT} currently requires the following tools and libraries from the system package manager:\n autoreconf\n libudev\n\nThese can be installed on Ubuntu systems via apt-get install autoreconf libudev-dev")
|
||||
endif()
|
||||
|
||||
@ -46,73 +44,13 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj
|
||||
LICENSE_SUBPATH COPYING
|
||||
)
|
||||
file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0)
|
||||
else()
|
||||
set(BASH /bin/bash)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release")
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
# Copy sources
|
||||
message(STATUS "Copying source files...")
|
||||
file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*)
|
||||
foreach(SOURCE_FILE ${PORT_SOURCE_FILES})
|
||||
file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
endforeach()
|
||||
message(STATUS "Copying source files... done")
|
||||
# Configure release
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug")
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
# Copy sources
|
||||
message(STATUS "Copying source files...")
|
||||
file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*)
|
||||
foreach(SOURCE_FILE ${PORT_SOURCE_FILES})
|
||||
file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
endforeach()
|
||||
message(STATUS "Copying source files... done")
|
||||
# Configure debug
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}/debug\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
# Build release
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-rel")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"make install\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
# Build debug
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg")
|
||||
execute_process(
|
||||
COMMAND "${BASH} --noprofile --norc -c \"make install\""
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
message(STATUS "Package ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
)
|
||||
vcpkg_install_make()
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/libusb/libusb.h
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: treehopper
|
||||
Version: 1.11.3-3
|
||||
Version: 1.11.3-4
|
||||
Description: Treehopper connects the physical world to your computer, tablet, or smartphone.
|
||||
Homepage: https://treehopper.io
|
||||
Build-Depends: libusb
|
||||
|
@ -1,5 +1,3 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||
|
||||
vcpkg_from_github(
|
||||
@ -18,8 +16,9 @@ vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/treehopper RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
@ -103,6 +103,8 @@ aws-lambda-cpp:x86-windows=fail
|
||||
aws-lambda-cpp:x64-osx=fail
|
||||
azure-c-shared-utility:arm-uwp=fail
|
||||
azure-c-shared-utility:x64-uwp=fail
|
||||
azure-kinect-sensor-sdk:x64-linux=fail
|
||||
azure-kinect-sensor-sdk:x64-osx=fail
|
||||
bde:arm64-windows=fail
|
||||
bde:arm-uwp=fail
|
||||
bde:x64-uwp=fail
|
||||
@ -703,6 +705,8 @@ libfabric:x64-uwp=fail
|
||||
libfabric:x64-windows=fail
|
||||
libfabric:x64-windows-static=fail
|
||||
libfreenect2:arm64-windows=fail
|
||||
libfreenect2:x64-linux=fail
|
||||
libfreenect2:x64-osx=fail
|
||||
libgit2:arm-uwp=fail
|
||||
libgit2:x64-uwp=fail
|
||||
libgo:arm-uwp=fail
|
||||
@ -890,8 +894,6 @@ libui:arm-uwp=fail
|
||||
libui:x64-linux=fail
|
||||
libui:x64-uwp=fail
|
||||
libusb:arm-uwp=fail
|
||||
libusb:x64-linux=fail
|
||||
libusb:x64-osx=fail
|
||||
libusb:x64-uwp=fail
|
||||
libusbmuxd:arm-uwp=fail
|
||||
libusbmuxd:x64-uwp=fail
|
||||
@ -1768,6 +1770,7 @@ torch-th:x64-uwp=fail
|
||||
torch-th:x64-windows-static=fail
|
||||
tre:x64-osx=fail
|
||||
treehopper:x64-windows-static=fail
|
||||
treehopper:x64-linux=fail
|
||||
turbobase64:arm64-windows=fail
|
||||
turbobase64:arm-uwp=fail
|
||||
turbobase64:x64-uwp=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user