2020-09-23 06:36:04 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "uwp")
|
2018-03-24 06:59:43 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-03-24 06:59:43 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO librsync/librsync
|
2021-09-08 12:40:10 +08:00
|
|
|
REF 42b636d2a65ab6914ea7cac50886da28192aaf9b # V2.3.2
|
|
|
|
SHA512 4903a64e327a7d49ae5f741b7b9fe3a76018010147249e2bc53917b06d31ee0f9b917f6c3e36a2d241ae66c19fa881113b59911d777742a859922486d9fe9c4c
|
2018-03-24 06:59:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-09-23 06:36:04 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_RDIFF:BOOL=OFF
|
|
|
|
-DENABLE_COMPRESSION:BOOL=OFF
|
|
|
|
-DENABLE_TRACE:BOOL=OFF
|
2018-03-24 06:59:43 +08:00
|
|
|
)
|
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-03-24 06:59:43 +08:00
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2018-03-24 06:59:43 +08:00
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/rsync.dll")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/rsync.dll" "${CURRENT_PACKAGES_DIR}/bin/rsync.dll")
|
2018-03-24 06:59:43 +08:00
|
|
|
endif()
|
2021-09-08 12:40:10 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll")
|
2018-03-24 06:59:43 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-30 07:59:03 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-09-08 12:40:10 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/librsync_export.h"
|
2020-12-30 07:59:03 +08:00
|
|
|
"# ifdef LIBRSYNC_STATIC_DEFINE"
|
|
|
|
"# if 1 /* LIBRSYNC_STATIC_DEFINE */"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-10-29 05:18:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-09-08 12:40:10 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|