[freerdp]Fix linux build, add dependency port glib. (#9176)

This commit is contained in:
Jack·Boos·Yu 2019-12-24 07:43:29 +08:00 committed by dan-shaw
parent 795ecaefed
commit 2ee03bab9f
3 changed files with 38 additions and 20 deletions

View File

@ -1,5 +1,5 @@
Source: freerdp
Version: 2.0.0-rc4-2
Version: 2.0.0-rc4-3
Homepage: https://github.com/FreeRDP/FreeRDP
Description: A free implementation of the Remote Desktop Protocol (RDP)
Build-Depends: openssl
Build-Depends: openssl, glib (!windows)

View File

@ -0,0 +1,13 @@
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")

View File

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FreeRDP/FreeRDP
@ -8,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
DontInstallSystemRuntimeLibs.patch
fix-linux-build.patch
)
if(VCPKG_CRT_LINKAGE STREQUAL "static")
@ -41,16 +40,23 @@ endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp-client2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr-tools2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp-client2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr-tools2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr2.dll")
else()
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()
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()
file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*")
foreach(FREERDP_TOOL ${FREERDP_TOOLS})
file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${FREERDP_TOOL})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
@ -65,10 +71,9 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Cli
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/winpr)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/lib/cmake)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freerdp)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freerdp/LICENSE ${CURRENT_PACKAGES_DIR}/share/freerdp/copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)