mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 00:29:08 +08:00
8ead9c2674
* [many ports]switch to vcpkg-cmake / vckg-cmake-config part 3 * version * typo * version * typo * version * Fix params * version * deprecated vcpkg_extract_source_archive_ex * version * fix arguments * version * Rename argument * version * Deprecate vcpkg_extract_source_archive_ex * version --------- Co-authored-by: jyu49 <yu_jack@apple.com>
43 lines
1.5 KiB
CMake
43 lines
1.5 KiB
CMake
set(LIBXDIFF_REF 77e30f3190685efd87cce2c9c5d688cbaa1b0134)
|
|
set(LIBXDIFF_SHA512 c559b575e6d6f06f3b3064f3e077a15d8f57422340199215a4cbd7beab527bc250347c8779a8d6f8c4e41799a032431e83c7336f86569527ab754444455b8c87)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Drako/libxdiff
|
|
REF ${LIBXDIFF_REF}
|
|
SHA512 ${LIBXDIFF_SHA512}
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/xdiff.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/xdiff.dll")
|
|
endif()
|
|
endif()
|
|
|
|
|
|
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/xdiff.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xdiff.dll")
|
|
endif()
|
|
endif()
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/XDiff PACKAGE_NAME XDiff)
|