2020-08-08 06:38:18 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
|
|
|
|
|
2021-12-01 03:50:56 +08:00
|
|
|
# Used for .pc file
|
|
|
|
set(VERSION "1.0.8")
|
2020-08-08 06:38:18 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO strukturag/libde265
|
2020-11-19 05:09:26 +08:00
|
|
|
REF 8aed7472df0af25b811828fa14f2f169dc34d35a # v1.0.8
|
|
|
|
SHA512 e2da1436e5b0d8a3841087e879fbbff5a92de4ebb69d097959972ec8c9407305bc2a17020cb46139fbacc84f91ff8cfb4d9547308074ba213e002ee36bb2e006
|
2020-08-08 06:38:18 +08:00
|
|
|
HEAD_REF master
|
2020-11-19 05:09:26 +08:00
|
|
|
PATCHES
|
|
|
|
fix-libde265-headers.patch
|
2020-08-08 06:38:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libde265/)
|
2020-11-19 05:09:26 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES dec265 enc265 AUTO_CLEAN)
|
2020-08-08 06:38:18 +08:00
|
|
|
|
2021-12-01 03:50:56 +08:00
|
|
|
set(prefix "")
|
|
|
|
set(exec_prefix [[${prefix}]])
|
|
|
|
set(libdir [[${prefix}/lib]])
|
|
|
|
set(includedir [[${prefix}/include]])
|
|
|
|
set(LIBS "")
|
|
|
|
configure_file("${SOURCE_PATH}/libde265.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libde265.pc" @ONLY)
|
|
|
|
# The produced library name is `liblibde265.a` or `libde265.lib`
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libde265.pc" "-lde265" "-llibde265")
|
|
|
|
# libde265's pc file assumes libstdc++, which isn't always true.
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libde265.pc" " -lstdc++" "")
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
configure_file("${SOURCE_PATH}/libde265.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libde265.pc" @ONLY)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libde265.pc" "-lde265" "-llibde265")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libde265.pc" " -lstdc++" "")
|
|
|
|
endif()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2020-08-08 06:38:18 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|