Skip to content

Commit

Permalink
[freerdp] Optional 'urbdrc' feature (microsoft#11639)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandro Sanchez Bach <[email protected]>
  • Loading branch information
AlexAltea authored Jun 1, 2020
1 parent c954caf commit 10eac5e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions ports/freerdp/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Source: freerdp
Version: 2.0.0
Version: 2.0.0-1
Homepage: https://github.com/FreeRDP/FreeRDP
Description: A free implementation of the Remote Desktop Protocol (RDP)
Build-Depends: openssl, libusb, glib (!windows)
Build-Depends: openssl, glib (!windows)

Feature: urbdrc
Description: USB redirection channel support
Build-Depends: libusb
13 changes: 9 additions & 4 deletions ports/freerdp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ file(WRITE "${SOURCE_PATH}/.source_version" "${SOURCE_VERSION}-vcpkg")

file(REMOVE ${SOURCE_PATH}/cmake/FindOpenSSL.cmake) # Remove outdated Module

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
urbdrc CHANNEL_URBDRC
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FREERDP_CRT_LINKAGE}
${FEATURE_OPTIONS}
)

vcpkg_install_cmake()
Expand All @@ -53,13 +58,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE ${FREERDP_DLL})
endforeach()

file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
foreach(FREERDP_DLL ${FREERDP_DLLS})
file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE ${FREERDP_DLL})
endforeach()
else()
else()
file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*")
foreach(FREERDP_TOOL ${FREERDP_TOOLS})
file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
Expand Down Expand Up @@ -112,7 +117,7 @@ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-Client
"bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/debug/*.lib)
file(REMOVE ${OBJS})
file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/*.lib)
Expand All @@ -124,4 +129,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/lib/cmake)

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

0 comments on commit 10eac5e

Please sign in to comment.