mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:19:01 +08:00
[freerdp] Update, cleanup + [libusb] Fix pc file (#32416)
* [freerdp] Update, cleanup * Add freerdp feature test port * Update baseline * [freerdp] ffmpeg unsupported on windows * libusb availability limitations * [freerdp] Update supported platforms * [freerdp] Update supported platforms * [freerdp] Use ffmpeg link libraries * [freerdp] Fix install destinations * [freerdp] Fix tools * [freerdp] Fix osx * [freerdp] Fix patch * [freerdp] Keep duplicate link libs * [freerdp] Mac client needs Xcode * [freerdp] Fix wfreerdp-server exe lib name * [freerdp] Fix client-mac * Fix patch * CI * Fix patch * Fix patch * Set PDB_NAME for server exe * Trim patch * Test urbdrc on windows * [libusb] Fix pc file for windows * [freerdp] Add missing find_dependency() * [freerdp] Export interface include directories
This commit is contained in:
parent
6ced774037
commit
2f6176ce98
21
ports/freerdp/cmake-project-include.cmake
Normal file
21
ports/freerdp/cmake-project-include.cmake
Normal file
@ -0,0 +1,21 @@
|
||||
find_package(PkgConfig REQUIRED)
|
||||
if(CHANNEL_URBDRC)
|
||||
pkg_check_modules(vcpkg_libusb REQUIRED libusb-1.0)
|
||||
set(LIBUSB_1_INCLUDE_DIR "${vcpkg_libusb_INCLUDE_DIRS}")
|
||||
set(LIBUSB_1_LIBRARY "${vcpkg_libusb_LINK_LIBRARIES}")
|
||||
string(REPLACE "-Wl,-framework," "-framework " libusb_frameworks "${vcpkg_libusb_LDFLAGS}")
|
||||
list(FILTER libusb_frameworks INCLUDE REGEX "^-framework ")
|
||||
list(APPEND LIBUSB_1_LIBRARY ${libusb_frameworks})
|
||||
endif()
|
||||
if(WITH_FFMPEG)
|
||||
# Exact pkg_check_modules signature as in project
|
||||
pkg_check_modules(AVCODEC libavcodec)
|
||||
set(AVCODEC_LIBRARY "${AVCODEC_LINK_LIBRARIES}")
|
||||
pkg_check_modules(AVUTIL libavutil)
|
||||
set(AVUTIL_LIBRARY "${AVUTIL_LINK_LIBRARIES}")
|
||||
string(REPLACE "-Wl,-framework," "-framework " avutil_frameworks "${AVUTIL_LDFLAGS}")
|
||||
list(FILTER avutil_frameworks INCLUDE REGEX "^-framework ")
|
||||
list(APPEND AVUTIL_LIBRARY ${avutil_frameworks})
|
||||
pkg_check_modules(SWRESAMPLE libswresample)
|
||||
set(SWRESAMPLE_LIBRARY "${SWRESAMPLE_LINK_LIBRARIES}")
|
||||
endif()
|
203
ports/freerdp/export-include.patch
Normal file
203
ports/freerdp/export-include.patch
Normal file
@ -0,0 +1,203 @@
|
||||
diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt
|
||||
index 882fef7..4ae7737 100644
|
||||
--- a/channels/CMakeLists.txt
|
||||
+++ b/channels/CMakeLists.txt
|
||||
@@ -213,6 +213,7 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna
|
||||
client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
|
||||
endif()
|
||||
endif()
|
||||
+ target_include_directories(${_module_name} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
endmacro(add_channel_client_library)
|
||||
|
||||
macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_name _type _dynamic _entry)
|
||||
@@ -253,6 +254,7 @@ macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_
|
||||
client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
|
||||
endif()
|
||||
endif()
|
||||
+ target_include_directories(${_module_name} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
endmacro(add_channel_client_subsystem_library)
|
||||
|
||||
macro(add_channel_server_library _module_prefix _module_name _channel_name _dynamic _entry)
|
||||
@@ -290,6 +292,7 @@ macro(add_channel_server_library _module_prefix _module_name _channel_name _dyna
|
||||
server_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
|
||||
endif()
|
||||
endif()
|
||||
+ target_include_directories(${_module_name} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
endmacro(add_channel_server_library)
|
||||
|
||||
set(FILENAME "ChannelOptions.cmake")
|
||||
diff --git a/channels/server/CMakeLists.txt b/channels/server/CMakeLists.txt
|
||||
index 1f49c3b..67d361f 100644
|
||||
--- a/channels/server/CMakeLists.txt
|
||||
+++ b/channels/server/CMakeLists.txt
|
||||
@@ -29,6 +29,7 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_SERVER_MODULES})
|
||||
endforeach()
|
||||
|
||||
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
if (WITH_LIBRARY_VERSIONING)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
||||
diff --git a/client/Android/CMakeLists.txt b/client/Android/CMakeLists.txt
|
||||
index b3473a9..5537033 100644
|
||||
--- a/client/Android/CMakeLists.txt
|
||||
+++ b/client/Android/CMakeLists.txt
|
||||
@@ -51,4 +51,5 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} jnigraphics)
|
||||
#set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT AndroidTargets)
|
||||
diff --git a/client/Mac/CMakeLists.txt b/client/Mac/CMakeLists.txt
|
||||
index b3eb591..f6f756b 100644
|
||||
--- a/client/Mac/CMakeLists.txt
|
||||
+++ b/client/Mac/CMakeLists.txt
|
||||
@@ -95,6 +95,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS} freerdp-client)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
# Set a list of the dependent targets used by the application. There should be a way to get this list automatically
|
||||
# from cmake, but for now I put it down manually. I got the references by calling "otool -L MacFreeRDP-client"
|
||||
diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt
|
||||
index b0a5d27..278b0fc 100644
|
||||
--- a/client/Windows/CMakeLists.txt
|
||||
+++ b/client/Windows/CMakeLists.txt
|
||||
@@ -80,6 +80,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} msimg32)
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries)
|
||||
diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt
|
||||
index 869652c..d170277 100644
|
||||
--- a/client/X11/CMakeLists.txt
|
||||
+++ b/client/X11/CMakeLists.txt
|
||||
@@ -238,6 +238,8 @@ if(WITH_IPP)
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${IPP_LIBRARY_LIST})
|
||||
endif()
|
||||
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
add_subdirectory(cli)
|
||||
diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt
|
||||
index 1de7461..acb6ecf 100644
|
||||
--- a/client/common/CMakeLists.txt
|
||||
+++ b/client/common/CMakeLists.txt
|
||||
@@ -77,6 +77,7 @@ else()
|
||||
target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
endif()
|
||||
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDP-ClientTargets)
|
||||
|
||||
diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt
|
||||
index 7e9a63d..b9b0ab0 100644
|
||||
--- a/libfreerdp/CMakeLists.txt
|
||||
+++ b/libfreerdp/CMakeLists.txt
|
||||
@@ -395,6 +395,7 @@ endif()
|
||||
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${LIBFREERDP_LIBS} winpr)
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDPTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt
|
||||
index 000e6d2..a84ce5e 100644
|
||||
--- a/rdtk/librdtk/CMakeLists.txt
|
||||
+++ b/rdtk/librdtk/CMakeLists.txt
|
||||
@@ -42,6 +42,7 @@ list(APPEND ${MODULE_PREFIX}_LIBS winpr)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS freerdp)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "RdTk")
|
||||
|
||||
diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt
|
||||
index 4086542..976bd86 100644
|
||||
--- a/server/Windows/CMakeLists.txt
|
||||
+++ b/server/Windows/CMakeLists.txt
|
||||
@@ -96,6 +96,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} dsound)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server freerdp)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
if(WITH_SERVER_INTERFACE)
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries)
|
||||
diff --git a/server/common/CMakeLists.txt b/server/common/CMakeLists.txt
|
||||
index 7c533b7..8503928 100644
|
||||
--- a/server/common/CMakeLists.txt
|
||||
+++ b/server/common/CMakeLists.txt
|
||||
@@ -62,6 +62,7 @@ endif()
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${FREERDP_CHANNELS_SERVER_LIBS})
|
||||
target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} winpr freerdp)
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDP-ServerTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt
|
||||
index 0daa245..583c0a4 100644
|
||||
--- a/server/shadow/CMakeLists.txt
|
||||
+++ b/server/shadow/CMakeLists.txt
|
||||
@@ -80,6 +80,7 @@ list(APPEND ${MODULE_PREFIX}_LIBS winpr-tools)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS rdtk)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR})
|
||||
if (WITH_LIBRARY_VERSIONING)
|
||||
@@ -285,6 +286,7 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow freerdp winpr)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
|
||||
if (WITH_LIBRARY_VERSIONING)
|
||||
diff --git a/uwac/libuwac/CMakeLists.txt b/uwac/libuwac/CMakeLists.txt
|
||||
index f66a8c4..ea08bed 100644
|
||||
--- a/uwac/libuwac/CMakeLists.txt
|
||||
+++ b/uwac/libuwac/CMakeLists.txt
|
||||
@@ -81,6 +81,7 @@ if (HAVE_PIXMAN_REGION)
|
||||
else()
|
||||
target_link_libraries(${MODULE_NAME} PRIVATE freerdp)
|
||||
endif()
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include/uwac0>)
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)
|
||||
|
||||
diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt
|
||||
index 2616439..1f4688e 100644
|
||||
--- a/winpr/libwinpr/CMakeLists.txt
|
||||
+++ b/winpr/libwinpr/CMakeLists.txt
|
||||
@@ -144,6 +144,7 @@ endif()
|
||||
|
||||
add_definitions(${WINPR_DEFINITIONS})
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_LIBS_PRIVATE} ${PUBLIC_KEYWORD} ${WINPR_LIBS_PUBLIC})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT WinPRTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
diff --git a/winpr/tools/CMakeLists.txt b/winpr/tools/CMakeLists.txt
|
||||
index 13f4c13..4a73333 100644
|
||||
--- a/winpr/tools/CMakeLists.txt
|
||||
+++ b/winpr/tools/CMakeLists.txt
|
||||
@@ -111,6 +111,7 @@ endif()
|
||||
|
||||
add_definitions(${WINPR_DEFINITIONS})
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_TOOLS_LIBS})
|
||||
+target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT WinPRTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
44
ports/freerdp/find-dependency.patch
Normal file
44
ports/freerdp/find-dependency.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/client/FreeRDP-ClientConfig.cmake.in b/client/FreeRDP-ClientConfig.cmake.in
|
||||
index 779374c..35b74c1 100644
|
||||
--- a/client/FreeRDP-ClientConfig.cmake.in
|
||||
+++ b/client/FreeRDP-ClientConfig.cmake.in
|
||||
@@ -1,3 +1,6 @@
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(WinPR @FREERDP_VERSION@)
|
||||
+find_dependency(FreeRDP @FREERDP_VERSION@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
diff --git a/libfreerdp/FreeRDPConfig.cmake.in b/libfreerdp/FreeRDPConfig.cmake.in
|
||||
index a2321e7..4c8379e 100644
|
||||
--- a/libfreerdp/FreeRDPConfig.cmake.in
|
||||
+++ b/libfreerdp/FreeRDPConfig.cmake.in
|
||||
@@ -1,3 +1,5 @@
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(WinPR @FREERDP_VERSION@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
diff --git a/server/FreeRDP-ServerConfig.cmake.in b/server/FreeRDP-ServerConfig.cmake.in
|
||||
index b9edb55..db7cb44 100644
|
||||
--- a/server/FreeRDP-ServerConfig.cmake.in
|
||||
+++ b/server/FreeRDP-ServerConfig.cmake.in
|
||||
@@ -1,3 +1,6 @@
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(WinPR @FREERDP_VERSION@)
|
||||
+find_dependency(FreeRDP @FREERDP_VERSION@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
diff --git a/server/shadow/FreeRDP-ShadowConfig.cmake.in b/server/shadow/FreeRDP-ShadowConfig.cmake.in
|
||||
index 1eb11e0..9b6f24c 100644
|
||||
--- a/server/shadow/FreeRDP-ShadowConfig.cmake.in
|
||||
+++ b/server/shadow/FreeRDP-ShadowConfig.cmake.in
|
||||
@@ -1,3 +1,7 @@
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(WinPR @FREERDP_VERSION@)
|
||||
+find_dependency(FreeRDP @FREERDP_VERSION@)
|
||||
+find_dependency(FreeRDP-Server @FREERDP_VERSION@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
127
ports/freerdp/fix-install-destination.patch
Normal file
127
ports/freerdp/fix-install-destination.patch
Normal file
@ -0,0 +1,127 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8894a58..d2f8b2f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -960,6 +960,9 @@ else()
|
||||
set(FREERDP_LIBRARY_PATH "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp${FREERDP_VERSION_MAJOR}")
|
||||
endif()
|
||||
+set(FREERDP_DATA_PATH "share/freerdp")
|
||||
+set(FREERDP_LIBRARY_PATH "${CMAKE_INSTALL_LIBDIR}")
|
||||
+set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp${FREERDP_VERSION_MAJOR}")
|
||||
set(FREERDP_ADDIN_PATH "${FREERDP_PLUGIN_PATH}")
|
||||
|
||||
# Path to put extensions
|
||||
diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt
|
||||
index 6274571..b0a5d27 100644
|
||||
--- a/client/Windows/CMakeLists.txt
|
||||
+++ b/client/Windows/CMakeLists.txt
|
||||
@@ -82,7 +82,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} msimg32)
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
- install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
+ install(TARGETS ${MODULE_NAME} COMPONENT libraries)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
||||
endif()
|
||||
diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt
|
||||
index b465a63..1de7461 100644
|
||||
--- a/client/common/CMakeLists.txt
|
||||
+++ b/client/common/CMakeLists.txt
|
||||
@@ -78,7 +78,7 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDP-ClientTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDP-ClientTargets)
|
||||
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt
|
||||
index a259b68..10a0921 100644
|
||||
--- a/libfreerdp/CMakeLists.txt
|
||||
+++ b/libfreerdp/CMakeLists.txt
|
||||
@@ -396,7 +396,7 @@ endif()
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${LIBFREERDP_LIBS} winpr)
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDPTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
||||
diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt
|
||||
index c7833ad..4086542 100644
|
||||
--- a/server/Windows/CMakeLists.txt
|
||||
+++ b/server/Windows/CMakeLists.txt
|
||||
@@ -98,7 +98,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server freerdp)
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
if(WITH_SERVER_INTERFACE)
|
||||
- install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
+ install(TARGETS ${MODULE_NAME} COMPONENT libraries)
|
||||
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
||||
diff --git a/server/common/CMakeLists.txt b/server/common/CMakeLists.txt
|
||||
index c94a209..7c533b7 100644
|
||||
--- a/server/common/CMakeLists.txt
|
||||
+++ b/server/common/CMakeLists.txt
|
||||
@@ -63,7 +63,7 @@ endif()
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${FREERDP_CHANNELS_SERVER_LIBS})
|
||||
target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} winpr freerdp)
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDP-ServerTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDP-ServerTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
||||
diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt
|
||||
index 3e0df0b..0daa245 100644
|
||||
--- a/server/shadow/CMakeLists.txt
|
||||
+++ b/server/shadow/CMakeLists.txt
|
||||
@@ -86,7 +86,7 @@ if (WITH_LIBRARY_VERSIONING)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
||||
endif()
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
||||
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
@@ -291,7 +291,7 @@ if (WITH_LIBRARY_VERSIONING)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
||||
endif()
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT server EXPORT FreeRDP-ShadowTargets)
|
||||
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt
|
||||
index 2df8d89..da23a1b 100644
|
||||
--- a/winpr/libwinpr/CMakeLists.txt
|
||||
+++ b/winpr/libwinpr/CMakeLists.txt
|
||||
@@ -144,7 +144,7 @@ endif()
|
||||
|
||||
add_definitions(${WINPR_DEFINITIONS})
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_LIBS_PRIVATE} ${PUBLIC_KEYWORD} ${WINPR_LIBS_PUBLIC})
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT WinPRTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
||||
diff --git a/winpr/tools/CMakeLists.txt b/winpr/tools/CMakeLists.txt
|
||||
index 0ddf9fb..b89a954 100644
|
||||
--- a/winpr/tools/CMakeLists.txt
|
||||
+++ b/winpr/tools/CMakeLists.txt
|
||||
@@ -112,7 +112,7 @@ endif()
|
||||
add_definitions(${WINPR_DEFINITIONS})
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_TOOLS_LIBS})
|
||||
|
||||
-install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
|
||||
+install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT WinPRTargets)
|
||||
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
|
||||
get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
|
||||
install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
|
@ -1,13 +0,0 @@
|
||||
diff --git a/channels/urbdrc/client/libusb/libusb_udevman.c b/channels/urbdrc/client/libusb/libusb_udevman.c
|
||||
index 5f1e9e0d2..022be4e21 100644
|
||||
--- a/channels/urbdrc/client/libusb/libusb_udevman.c
|
||||
+++ b/channels/urbdrc/client/libusb/libusb_udevman.c
|
||||
@@ -581,7 +581,7 @@ static BOOL device_is_filtered(struct libusb_device* dev,
|
||||
return filtered;
|
||||
}
|
||||
|
||||
-static int hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev,
|
||||
+static int LIBUSB_CALL hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev,
|
||||
libusb_hotplug_event event, void* user_data)
|
||||
{
|
||||
VID_PID_PAIR pair;
|
@ -1,13 +0,0 @@
|
||||
diff --git a/winpr/tools/makecert-cli/CMakeLists.txt b/winpr/tools/makecert-cli/CMakeLists.txt
|
||||
index 48fda5b..4e15a22 100644
|
||||
--- a/winpr/tools/makecert-cli/CMakeLists.txt
|
||||
+++ b/winpr/tools/makecert-cli/CMakeLists.txt
|
||||
@@ -42,7 +42,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS winpr-tools)
|
||||
|
||||
-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} winpr)
|
||||
+target_link_libraries(${MODULE_NAME} ${OPENSSL_LIBRARIES} ${${MODULE_PREFIX}_LIBS} winpr)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools")
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5e67ef9..4ef3e8e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-cmake_minimum_required(VERSION 2.8)
|
||||
+cmake_minimum_required(VERSION 3.11)
|
||||
|
||||
project(FreeRDP C CXX)
|
||||
|
37
ports/freerdp/keep-dup-libs.patch
Normal file
37
ports/freerdp/keep-dup-libs.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt
|
||||
index 10a0921..7e9a63d 100644
|
||||
--- a/libfreerdp/CMakeLists.txt
|
||||
+++ b/libfreerdp/CMakeLists.txt
|
||||
@@ -363,7 +363,6 @@ endif()
|
||||
# /primitives
|
||||
|
||||
list(REMOVE_DUPLICATES LIBFREERDP_DEFINITIONS)
|
||||
-list(REMOVE_DUPLICATES LIBFREERDP_LIBS)
|
||||
list(REMOVE_DUPLICATES LIBFREERDP_INCLUDES)
|
||||
include_directories(${LIBFREERDP_INCLUDES})
|
||||
|
||||
diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt
|
||||
index da23a1b..2616439 100644
|
||||
--- a/winpr/libwinpr/CMakeLists.txt
|
||||
+++ b/winpr/libwinpr/CMakeLists.txt
|
||||
@@ -113,8 +113,6 @@ endforeach()
|
||||
|
||||
set(MODULE_NAME winpr)
|
||||
list(REMOVE_DUPLICATES WINPR_DEFINITIONS)
|
||||
-list(REMOVE_DUPLICATES WINPR_LIBS_PRIVATE)
|
||||
-list(REMOVE_DUPLICATES WINPR_LIBS_PUBLIC)
|
||||
list(REMOVE_DUPLICATES WINPR_INCLUDES)
|
||||
include_directories(${WINPR_INCLUDES})
|
||||
|
||||
diff --git a/winpr/tools/CMakeLists.txt b/winpr/tools/CMakeLists.txt
|
||||
index b89a954..13f4c13 100644
|
||||
--- a/winpr/tools/CMakeLists.txt
|
||||
+++ b/winpr/tools/CMakeLists.txt
|
||||
@@ -82,7 +82,6 @@ add_subdirectory(makecert)
|
||||
|
||||
set(MODULE_NAME winpr-tools)
|
||||
list(REMOVE_DUPLICATES WINPR_TOOLS_DEFINITIONS)
|
||||
-list(REMOVE_DUPLICATES WINPR_TOOLS_LIBS)
|
||||
list(REMOVE_DUPLICATES WINPR_TOOLS_INCLUDES)
|
||||
include_directories(${WINPR_TOOLS_INCLUDES})
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 97ba2f9..fc36185 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -907,6 +907,7 @@ if(OPENSSL_FOUND)
|
||||
add_definitions("-DWITH_OPENSSL")
|
||||
message(STATUS "Using OpenSSL Version: ${OPENSSL_VERSION}")
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
+ list(APPEND OPENSSL_LIBRARIES Threads::Threads)
|
||||
endif()
|
||||
|
||||
if(MBEDTLS_FOUND)
|
@ -1,154 +1,116 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO FreeRDP/FreeRDP
|
||||
REF 2.9.0
|
||||
SHA512 8b43ff28c5afaf6dc12f73fe9cab3969049f40725dedc873af5af1caabefec4bdd1bedad7df121c1440493e5441296db076ba7726242bfb32f76dad0b21564ed
|
||||
REF "${VERSION}"
|
||||
SHA512 388c00d2f883b41d4ec127bcb871607429c136bfb99daf87f491e9f1e7d456e1fac403db9f9dec7611e729dfd2f913fa414ed3d0020d92c284c8f3ba1eeb80cb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
DontInstallSystemRuntimeLibs.patch
|
||||
fix-linux-build.patch
|
||||
openssl_threads.patch
|
||||
fix-include-path.patch
|
||||
fix-libusb.patch
|
||||
install-dirs.patch
|
||||
fix-FreeRDP.patch
|
||||
fix-install-destination.patch
|
||||
keep-dup-libs.patch
|
||||
wfreerdp-server-cli.patch
|
||||
pr-7060-jni-onload.patch
|
||||
find-dependency.patch
|
||||
export-include.patch
|
||||
)
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/FindOpenSSL.cmake")
|
||||
file(WRITE "${SOURCE_PATH}/.source_version" "${VERSION}-vcpkg")
|
||||
|
||||
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n")
|
||||
if("x11" IN_LIST FEATURES)
|
||||
message(STATUS "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n")
|
||||
endif()
|
||||
set(FREERDP_WITH_CLIENT)
|
||||
if (VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX)
|
||||
set(FREERDP_WITH_CLIENT -DWITH_CLIENT=OFF)
|
||||
endif()
|
||||
|
||||
set(FREERDP_CRT_LINKAGE)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
set(FREERDP_CRT_LINKAGE -DMSVC_RUNTIME=static)
|
||||
endif()
|
||||
|
||||
get_filename_component(SOURCE_VERSION "${SOURCE_PATH}" NAME)
|
||||
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
|
||||
FEATURES
|
||||
server WITH_SERVER
|
||||
urbdrc CHANNEL_URBDRC
|
||||
client-mac WITH_CLIENT_MAC
|
||||
ffmpeg WITH_FFMPEG
|
||||
ffmpeg WITH_SWSCALE
|
||||
server WITH_SERVER
|
||||
urbdrc CHANNEL_URBDRC
|
||||
wayland WITH_WAYLAND
|
||||
winpr-tools WITH_WINPR_TOOLS
|
||||
x11 WITH_X11
|
||||
)
|
||||
|
||||
vcpkg_list(SET GENERATOR_OPTION)
|
||||
if(VCPKG_TARGET_IS_OSX)
|
||||
list(APPEND GENERATOR_OPTION GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
${GENERATOR_OPTION}
|
||||
OPTIONS
|
||||
${FREERDP_CRT_LINKAGE}
|
||||
${FREERDP_WITH_CLIENT}
|
||||
${FEATURE_OPTIONS}
|
||||
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
|
||||
-DWITH_CCACHE=OFF
|
||||
-DWITH_CLANG_FORMAT=OFF
|
||||
-DWITH_MANPAGES=OFF
|
||||
-DWITH_OPENSSL=ON
|
||||
"-DMSVC_RUNTIME=${VCPKG_CRT_LINKAGE}"
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
|
||||
# Uncontrolled dependencies w.r.t. vcpkg ports
|
||||
# Can be overriden in custom triplet file
|
||||
-DWITH_ALSA=OFF
|
||||
-DWITH_CAIRO=OFF
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
MSVC_RUNTIME
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(GLOB_RECURSE TOOLS_RELEASE "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
||||
|
||||
if(TOOLS_RELEASE)
|
||||
file(COPY ${TOOLS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
file(GLOB_RECURSE TOOLS_DEBUG "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
||||
file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
foreach(FREERDP_DLL ${FREERDP_DLLS})
|
||||
file(COPY "${FREERDP_DLL}" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE "${FREERDP_DLL}")
|
||||
endforeach()
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
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()
|
||||
vcpkg_list(SET tools)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND tools wfreerdp)
|
||||
if("server" IN_LIST FEATURES)
|
||||
list(APPEND tools wfreerdp-server)
|
||||
endif()
|
||||
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}")
|
||||
file(REMOVE "${FREERDP_TOOL}")
|
||||
endforeach()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
foreach(PACKAGE FreeRDP-Client2 FreeRDP2 WinPR2)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE}_temp")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE}" "${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE}_temp/${PACKAGE}")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp/${PACKAGE}")
|
||||
elseif(VCPKG_TARGET_IS_OSX)
|
||||
if("client-mac" IN_LIST FEATURES)
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/client/Mac/cli/MacFreeRDP.app"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/bin"
|
||||
)
|
||||
list(APPEND tools MacFreeRDP)
|
||||
endif()
|
||||
if("server" IN_LIST FEATURES)
|
||||
list(APPEND tools mfreerdp-server)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 PACKAGE_NAME FreeRDP-Client)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2 PACKAGE_NAME FreeRDP)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 PACKAGE_NAME WinPR)
|
||||
|
||||
vcpkg_fixup_pkgconfig(SKIP_CHECK)
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake"
|
||||
"debug/lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"debug/bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake"
|
||||
"debug/lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"debug/bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake"
|
||||
"lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake"
|
||||
"lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-debug.cmake"
|
||||
"debug/lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"debug/bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
if("wayland" IN_LIST FEATURES)
|
||||
list(APPEND tools wlfreerdp)
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-release.cmake"
|
||||
"lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-debug.cmake"
|
||||
"debug/lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"debug/bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
if("x11" IN_LIST FEATURES)
|
||||
list(APPEND tools xfreerdp)
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-release.cmake"
|
||||
"lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
"bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
|
||||
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")
|
||||
file(REMOVE ${OBJS})
|
||||
if("winpr-tools" IN_LIST FEATURES)
|
||||
list(APPEND tools winpr-hash winpr-makecert)
|
||||
endif()
|
||||
if("server" IN_LIST FEATURES)
|
||||
list(APPEND tools freerdp-proxy freerdp-shadow-cli)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP-Server2 PACKAGE_NAME freerdp-server2 DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP-Shadow2 PACKAGE_NAME freerdp-shadow2 DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
endif()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP-Client2 PACKAGE_NAME freerdp-client2 DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/WinPR2 PACKAGE_NAME winpr2 DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeRDP2 PACKAGE_NAME freerdp)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/cmake")
|
||||
|
||||
if(tools)
|
||||
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/freerdp/build-config.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" ".")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/freerdp/build-config.h" "${CURRENT_PACKAGES_DIR}/" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/freerdp/build-config.h" "${CURRENT_PACKAGES_DIR}" "")
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
)
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
89
ports/freerdp/pr-7060-jni-onload.patch
Normal file
89
ports/freerdp/pr-7060-jni-onload.patch
Normal file
@ -0,0 +1,89 @@
|
||||
diff --git a/client/Android/android_freerdp.c b/client/Android/android_freerdp.c
|
||||
index 0fd987f446e..014c4d4db96 100644
|
||||
--- a/client/Android/android_freerdp.c
|
||||
+++ b/client/Android/android_freerdp.c
|
||||
@@ -1093,7 +1093,10 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
(*env)->RegisterNatives(env, activityClass, methods, sizeof(methods) / sizeof(methods[0]));
|
||||
/* create global reference for class */
|
||||
gJavaActivityClass = (*env)->NewGlobalRef(env, activityClass);
|
||||
+
|
||||
g_JavaVm = vm;
|
||||
+ winpr_set_java_vm((void*)vm);
|
||||
+
|
||||
return init_callback_environment(vm, env);
|
||||
}
|
||||
|
||||
diff --git a/winpr/include/winpr/sysinfo.h b/winpr/include/winpr/sysinfo.h
|
||||
index c14e999d970..7af615947bd 100644
|
||||
--- a/winpr/include/winpr/sysinfo.h
|
||||
+++ b/winpr/include/winpr/sysinfo.h
|
||||
@@ -344,6 +344,20 @@ extern "C"
|
||||
#define PF_SSE_INSTRUCTIONS_AVAILABLE PF_XMMI_INSTRUCTIONS_AVAILABLE
|
||||
#define PF_SSE2_INSTRUCTIONS_AVAILABLE PF_XMMI64_INSTRUCTIONS_AVAILABLE
|
||||
|
||||
+#ifdef ANDROID
|
||||
+
|
||||
+ /*
|
||||
+ * Call winpr_set_java_vm() from JNI_OnLoad in a shared library:
|
||||
+ * JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
+ * and then call winpr_get_java_vm to obtain the JavaVM* handle.
|
||||
+ * The functions use void* to avoid including jni.h in exported headers.
|
||||
+ */
|
||||
+
|
||||
+ WINPR_API void winpr_set_java_vm(void* vm);
|
||||
+ WINPR_API void* winpr_get_java_vm();
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c
|
||||
index dd15bb374e2..a4d0ddf90cc 100644
|
||||
--- a/winpr/libwinpr/sysinfo/sysinfo.c
|
||||
+++ b/winpr/libwinpr/sysinfo/sysinfo.c
|
||||
@@ -988,3 +988,20 @@ BOOL IsProcessorFeaturePresentEx(DWORD ProcessorFeature)
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+#ifdef ANDROID
|
||||
+
|
||||
+#include <jni.h>
|
||||
+static JavaVM* g_JavaVM = NULL;
|
||||
+
|
||||
+void winpr_set_java_vm(void* vm)
|
||||
+{
|
||||
+ g_JavaVM = (JavaVM*)vm;
|
||||
+}
|
||||
+
|
||||
+void* winpr_get_java_vm()
|
||||
+{
|
||||
+ return (void*)g_JavaVM;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/winpr/libwinpr/timezone/timezone.c b/winpr/libwinpr/timezone/timezone.c
|
||||
index b29ecab33dd..c42928d6738 100644
|
||||
--- a/winpr/libwinpr/timezone/timezone.c
|
||||
+++ b/winpr/libwinpr/timezone/timezone.c
|
||||
@@ -151,18 +151,12 @@ static char* winpr_get_timezone_from_link(void)
|
||||
|
||||
#if defined(ANDROID)
|
||||
#include <jni.h>
|
||||
-static JavaVM* jniVm = NULL;
|
||||
-
|
||||
-JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
-{
|
||||
- jniVm = vm;
|
||||
- return JNI_VERSION_1_6;
|
||||
-}
|
||||
|
||||
static char* winpr_get_android_timezone_identifier(void)
|
||||
{
|
||||
char* tzid = NULL;
|
||||
JNIEnv* jniEnv;
|
||||
+ JavaVM* jniVm = (JavaVM*)winpr_get_java_vm();
|
||||
|
||||
/* Preferred: Try to get identifier from java TimeZone class */
|
||||
if (jniVm && ((*jniVm)->GetEnv(jniVm, (void**)&jniEnv, JNI_VERSION_1_6) == JNI_OK))
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "freerdp",
|
||||
"version": "2.9.0",
|
||||
"version": "2.10.0",
|
||||
"description": "A free implementation of the Remote Desktop Protocol (RDP)",
|
||||
"homepage": "https://github.com/FreeRDP/FreeRDP",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!(arm | uwp)",
|
||||
"supports": "!uwp & !(arm & windows)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "glib",
|
||||
@ -18,17 +18,59 @@
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "zlib",
|
||||
"platform": "!windows"
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"client-mac": {
|
||||
"description": "Build native mac client. Requires XCode.",
|
||||
"supports": "osx"
|
||||
},
|
||||
"ffmpeg": {
|
||||
"description": "Enable image scaling, video and audio with ffmpeg",
|
||||
"supports": "!windows",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "ffmpeg",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"avcodec",
|
||||
"swresample",
|
||||
"swscale"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"server": {
|
||||
"description": "With server"
|
||||
"description": "Build server components",
|
||||
"supports": "!android & !ios & !uwp"
|
||||
},
|
||||
"urbdrc": {
|
||||
"description": "USB redirection channel support",
|
||||
"dependencies": [
|
||||
"libusb"
|
||||
]
|
||||
},
|
||||
"wayland": {
|
||||
"description": "Enable wayland support",
|
||||
"supports": "!windows & !android & !ios & !osx & !openbsd",
|
||||
"dependencies": [
|
||||
"wayland"
|
||||
]
|
||||
},
|
||||
"winpr-tools": {
|
||||
"description": "Build winpr tools",
|
||||
"supports": "!android & !ios & !uwp"
|
||||
},
|
||||
"x11": {
|
||||
"description": "Enable X11 support",
|
||||
"supports": "!windows & !android & !ios",
|
||||
"dependencies": [
|
||||
"xcb"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,11 @@
|
||||
diff --git a/server/Windows/cli/CMakeLists.txt b/server/Windows/cli/CMakeLists.txt
|
||||
index e60de909d..f67078696 100644
|
||||
index fcfa811..e4d4360 100644
|
||||
--- a/server/Windows/cli/CMakeLists.txt
|
||||
+++ b/server/Windows/cli/CMakeLists.txt
|
||||
@@ -40,7 +40,7 @@ set (${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/
|
||||
|
||||
@@ -41,5 +41,5 @@ set (${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
-set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "wfreerdp-server")
|
||||
+#set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "wfreerdp-server")
|
||||
+set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_NAME wfreerdp-server PDB_NAME wfreerdp-server.exe)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS wfreerdp-server)
|
||||
|
@ -12,7 +12,7 @@ vcpkg_from_github(
|
||||
)
|
||||
|
||||
function(replace_runtime_library PROJ_FILE)
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
file(READ "${PROJ_FILE}" PROJ_CONTENT)
|
||||
string(REPLACE "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
|
||||
string(REPLACE "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
|
||||
@ -50,9 +50,11 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(libdir [[${prefix}/lib]])
|
||||
set(includedir [[${prefix}/include]])
|
||||
configure_file("${SOURCE_PATH}/libusb-1.0.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libusb-1.0.pc" @ONLY)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libusb-1.0.pc" " -lusb-1.0" " -llibusb-1.0")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
set(includedir [[${prefix}/../include]])
|
||||
configure_file("${SOURCE_PATH}/libusb-1.0.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libusb-1.0.pc" @ONLY)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libusb-1.0.pc" " -lusb-1.0" " -llibusb-1.0")
|
||||
endif()
|
||||
else()
|
||||
vcpkg_configure_make(
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "libusb",
|
||||
"version": "1.0.26.11791",
|
||||
"port-version": 1,
|
||||
"description": "a cross-platform library to access USB devices",
|
||||
"homepage": "https://github.com/libusb/libusb",
|
||||
"license": "LGPL-2.1-or-later",
|
||||
|
@ -397,7 +397,6 @@ freeopcua:arm-neon-android=fail
|
||||
freeopcua:arm64-android=fail
|
||||
freeopcua:arm64-windows=fail
|
||||
freeopcua:x64-android=fail
|
||||
freerdp:x64-android=fail
|
||||
fruit:arm-neon-android=fail
|
||||
fruit:arm64-android=fail
|
||||
fruit:x64-android=fail
|
||||
@ -1485,6 +1484,15 @@ vcpkg-ci-ffmpeg:x64-windows-static-md=pass
|
||||
vcpkg-ci-ffmpeg:x64-windows-static=pass
|
||||
vcpkg-ci-ffmpeg:x64-windows=pass
|
||||
vcpkg-ci-ffmpeg:x86-windows=pass
|
||||
vcpkg-ci-freerdp:arm-neon-android=pass
|
||||
vcpkg-ci-freerdp:arm64-android=pass
|
||||
vcpkg-ci-freerdp:x64-android=pass
|
||||
vcpkg-ci-freerdp:x64-linux=pass
|
||||
vcpkg-ci-freerdp:x64-osx=pass
|
||||
vcpkg-ci-freerdp:x64-windows-static-md=pass
|
||||
vcpkg-ci-freerdp:x64-windows-static=pass
|
||||
vcpkg-ci-freerdp:x64-windows=pass
|
||||
vcpkg-ci-freerdp:x86-windows=pass
|
||||
vcpkg-ci-llvm:x64-linux=pass
|
||||
vcpkg-ci-llvm:x64-osx=pass
|
||||
vcpkg-ci-llvm:x64-windows-static-md=pass
|
||||
|
1
scripts/test_ports/vcpkg-ci-freerdp/portfile.cmake
Normal file
1
scripts/test_ports/vcpkg-ci-freerdp/portfile.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
32
scripts/test_ports/vcpkg-ci-freerdp/vcpkg.json
Normal file
32
scripts/test_ports/vcpkg-ci-freerdp/vcpkg.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "vcpkg-ci-freerdp",
|
||||
"version-string": "ci",
|
||||
"description": "Force non-default features of freerdp within vcpkg CI",
|
||||
"homepage": "https://github.com/microsoft/vcpkg",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "freerdp",
|
||||
"features": [
|
||||
"wayland",
|
||||
"x11"
|
||||
],
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "freerdp",
|
||||
"features": [
|
||||
"ffmpeg"
|
||||
],
|
||||
"platform": "linux | osx"
|
||||
},
|
||||
{
|
||||
"name": "freerdp",
|
||||
"features": [
|
||||
"server",
|
||||
"urbdrc",
|
||||
"winpr-tools"
|
||||
],
|
||||
"platform": "linux | osx | windows"
|
||||
}
|
||||
]
|
||||
}
|
@ -2669,7 +2669,7 @@
|
||||
"port-version": 7
|
||||
},
|
||||
"freerdp": {
|
||||
"baseline": "2.9.0",
|
||||
"baseline": "2.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"freetds": {
|
||||
@ -4742,7 +4742,7 @@
|
||||
},
|
||||
"libusb": {
|
||||
"baseline": "1.0.26.11791",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"libusb-win32": {
|
||||
"baseline": "1.2.6.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "576db0702d3a36fbca154e4ee18030d28d0e05d0",
|
||||
"version": "2.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e3b6d222459b1a4ff5d0e0b16d4330620d47715a",
|
||||
"version": "2.9.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "653d47743e90abaa28a3d17b49fe479a0096f8ef",
|
||||
"version": "1.0.26.11791",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "230bacd99c77786d65d0cfe9ba51ec472521c382",
|
||||
"version": "1.0.26.11791",
|
||||
|
Loading…
Reference in New Issue
Block a user