2017-03-16 07:06:38 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-07-25 21:46:05 +08:00
|
|
|
set(FREERDP_VERSION 2.0.0-rc0)
|
|
|
|
set(FREERDP_REVISION 2.0.0-rc0)
|
2017-09-13 04:32:26 +08:00
|
|
|
set(FREERDP_HASH d3eb0d5d23aa2a4d0277414f13a984d40aba051102c5af1e5ade975cdb469ef3549b145cd4339415fc33f056044929cfac71884512ea77a1e718d70d5b21b9dd)
|
2017-03-16 07:06:38 +08:00
|
|
|
|
|
|
|
string(REGEX REPLACE "\\+" "-" FREERDP_VERSION_ESCAPED ${FREERDP_VERSION})
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeRDP-${FREERDP_VERSION_ESCAPED})
|
|
|
|
|
2017-05-11 08:08:24 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO FreeRDP/FreeRDP
|
|
|
|
REF ${FREERDP_REVISION}
|
2017-03-16 07:06:38 +08:00
|
|
|
SHA512 ${FREERDP_HASH}
|
2017-05-11 08:08:24 +08:00
|
|
|
HEAD_REF master
|
2017-03-16 07:06:38 +08:00
|
|
|
)
|
|
|
|
|
2017-03-22 06:27:13 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/DontInstallSystemRuntimeLibs.patch
|
2017-05-11 08:08:24 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/FixGitRevisionDetection.patch
|
2017-03-22 06:27:13 +08:00
|
|
|
)
|
|
|
|
|
2017-03-16 07:06:38 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
|
|
set(FREERDP_CRT_LINKAGE -DMSVC_RUNTIME=static)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2017-05-11 08:08:24 +08:00
|
|
|
OPTIONS -DGIT_REVISION=${FREERDP_VERSION}
|
|
|
|
${FREERDP_CRT_LINKAGE})
|
2017-03-16 07:06:38 +08:00
|
|
|
|
|
|
|
vcpkg_build_cmake()
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
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")
|
|
|
|
endif()
|
|
|
|
|
2017-03-22 06:27:13 +08:00
|
|
|
if(NOT TARGET_TRIPLET MATCHES "uwp")
|
2017-07-25 21:46:17 +08:00
|
|
|
file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
|
|
|
|
file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
|
|
|
|
|
|
file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG})
|
2017-03-16 07:06:38 +08:00
|
|
|
endif()
|
|
|
|
|
2017-07-25 21:46:17 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
|
|
|
|
2017-03-16 07:06:38 +08:00
|
|
|
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(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-07-25 21:46:17 +08:00
|
|
|
|
2017-03-16 07:06:38 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
endif()
|
|
|
|
|
2017-09-13 04:32:26 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/freerdp/cmake)
|