2017-05-11 08:08:24 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO FreeRDP/FreeRDP
|
2023-08-01 06:53:11 +08:00
|
|
|
REF "${VERSION}"
|
2023-10-03 10:59:40 +08:00
|
|
|
SHA512 722d95d7591b5ce6a7e8a3b6ac8999df278dbcfc286a532f56bcbc4a3881e75b02c7e3cd4b296e67bc19d1165020acdcca198bf4bcc92aea5611760037fcc57f
|
2017-05-11 08:08:24 +08:00
|
|
|
HEAD_REF master
|
2019-05-22 12:00:24 +08:00
|
|
|
PATCHES
|
|
|
|
DontInstallSystemRuntimeLibs.patch
|
2020-04-04 01:22:28 +08:00
|
|
|
fix-include-path.patch
|
2023-08-01 06:53:11 +08:00
|
|
|
fix-install-destination.patch
|
|
|
|
keep-dup-libs.patch
|
|
|
|
wfreerdp-server-cli.patch
|
|
|
|
pr-7060-jni-onload.patch
|
|
|
|
find-dependency.patch
|
|
|
|
export-include.patch
|
2017-03-16 07:06:38 +08:00
|
|
|
)
|
2023-08-01 06:53:11 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/FindOpenSSL.cmake")
|
|
|
|
file(WRITE "${SOURCE_PATH}/.source_version" "${VERSION}-vcpkg")
|
2017-03-16 07:06:38 +08:00
|
|
|
|
2023-08-01 06:53:11 +08:00
|
|
|
if("x11" IN_LIST FEATURES)
|
|
|
|
message(STATUS "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n")
|
2020-03-28 10:32:10 +08:00
|
|
|
endif()
|
2019-05-25 00:42:12 +08:00
|
|
|
|
2020-06-02 07:03:29 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-07-30 02:10:52 +08:00
|
|
|
FEATURES
|
2023-08-01 06:53:11 +08:00
|
|
|
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
|
2020-06-02 07:03:29 +08:00
|
|
|
)
|
|
|
|
|
2023-08-01 06:53:11 +08:00
|
|
|
vcpkg_list(SET GENERATOR_OPTION)
|
|
|
|
if(VCPKG_TARGET_IS_OSX)
|
|
|
|
list(APPEND GENERATOR_OPTION GENERATOR "Unix Makefiles")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
|
2021-11-30 09:05:12 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-08-01 06:53:11 +08:00
|
|
|
${GENERATOR_OPTION}
|
2019-05-22 12:00:24 +08:00
|
|
|
OPTIONS
|
2020-06-02 07:03:29 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2023-08-01 06:53:11 +08:00
|
|
|
"-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
|
2019-05-22 12:00:24 +08:00
|
|
|
)
|
2017-03-16 07:06:38 +08:00
|
|
|
|
2021-11-30 09:05:12 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-03-16 07:06:38 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-08-01 06:53:11 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-03-16 07:06:38 +08:00
|
|
|
|
2023-08-01 06:53:11 +08:00
|
|
|
vcpkg_list(SET tools)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
list(APPEND tools wfreerdp)
|
|
|
|
if("server" IN_LIST FEATURES)
|
|
|
|
list(APPEND tools wfreerdp-server)
|
2022-10-27 01:55:31 +08:00
|
|
|
endif()
|
2023-08-01 06:53:11 +08:00
|
|
|
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)
|
2022-10-27 01:55:31 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2023-08-01 06:53:11 +08:00
|
|
|
if("wayland" IN_LIST FEATURES)
|
|
|
|
list(APPEND tools wlfreerdp)
|
2022-10-27 01:55:31 +08:00
|
|
|
endif()
|
2023-08-01 06:53:11 +08:00
|
|
|
if("x11" IN_LIST FEATURES)
|
|
|
|
list(APPEND tools xfreerdp)
|
2022-10-27 01:55:31 +08:00
|
|
|
endif()
|
2023-08-01 06:53:11 +08:00
|
|
|
if("winpr-tools" IN_LIST FEATURES)
|
|
|
|
list(APPEND tools winpr-hash winpr-makecert)
|
2020-05-08 13:25:28 +08:00
|
|
|
endif()
|
2023-08-01 06:53:11 +08:00
|
|
|
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)
|
2020-05-08 13:25:28 +08:00
|
|
|
|
2023-08-01 06:53:11 +08:00
|
|
|
if(tools)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
|
|
|
|
endif()
|
2021-11-30 09:05:12 +08:00
|
|
|
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/freerdp/build-config.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" ".")
|
2022-01-07 07:35:44 +08:00
|
|
|
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}" "")
|
2021-11-30 09:05:12 +08:00
|
|
|
|
2023-08-01 06:53:11 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
|
|
|
|
2021-11-30 09:05:12 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|