2016-10-24 04:26:15 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-03-24 21:39:50 +08:00
|
|
|
|
2018-01-19 13:06:04 +08:00
|
|
|
set(WEBP_VERSION 0.6.1)
|
|
|
|
set(WEBP_HASH f2512db136c9d9a455463134df1aff427f9d603aedd4cabd97ad26f3fa717806427f10a3162a94322900f2457268c867f1b655fc2a6a99d58c4141145979797a)
|
2017-03-24 21:39:50 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebp-${WEBP_VERSION})
|
|
|
|
|
2016-10-24 04:26:15 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-03-24 21:39:50 +08:00
|
|
|
URLS "https://github.com/webmproject/libwebp/archive/v${WEBP_VERSION}.zip"
|
|
|
|
FILENAME "libwebp-${WEBP_VERSION}.zip"
|
|
|
|
SHA512 ${WEBP_HASH}
|
2016-10-24 04:26:15 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
2018-02-01 23:06:54 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/build_fixes.patch
|
|
|
|
)
|
|
|
|
|
2016-10-24 04:26:15 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-03-24 21:39:50 +08:00
|
|
|
PREFER_NINJA
|
2018-02-01 23:06:54 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_DEBUG_POSTFIX=d
|
|
|
|
-DWEBP_BUILD_MUX=ON
|
2016-10-24 04:26:15 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2018-01-19 13:06:04 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
|
2016-10-24 04:26:15 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebp/COPYING ${CURRENT_PACKAGES_DIR}/share/libwebp/copyright)
|
2016-11-01 03:34:04 +08:00
|
|
|
|
2018-02-01 23:06:54 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2018-02-22 08:42:23 +08:00
|
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWebP.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp)
|