mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 02:09:00 +08:00
df0a79f8bd
* [sail] Update to 0.9.0 (draft) * [sail] vcpkg x-add-version --all * [sail] Fix webp in upstream * [sail] vcpkg x-add-version --all --overwrite-version * [sail] Use BUILD_TESTING * [sail] vcpkg x-add-version --all --overwrite-version * [sail] Update URL * [sail] vcpkg x-add-version --all --overwrite-version * [sail] Update release hash * vcpkg x-add-version --all * [sail] Added double quotes * vcpkg x-add-version --all
60 lines
2.2 KiB
CMake
60 lines
2.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO HappySeaFox/sail
|
|
REF "v${VERSION}"
|
|
SHA512 9d2e783a597bea5923db4eb822985488a24c5337376384f69bedeb2952d23e84005639c0e1aa243b81b40e87e428da470895ce30418fc31e0f1b60bc71b17d09
|
|
HEAD_REF master
|
|
)
|
|
|
|
# Enable selected codecs
|
|
set(ONLY_CODECS "")
|
|
|
|
foreach(CODEC avif bmp gif ico jpeg jpeg2000 jpegxl pcx png psd qoi tga tiff wal webp xbm)
|
|
if (${CODEC} IN_LIST FEATURES)
|
|
list(APPEND ONLY_CODECS ${CODEC})
|
|
endif()
|
|
endforeach()
|
|
|
|
list(JOIN ONLY_CODECS "\;" ONLY_CODECS_ESCAPED)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_TESTING=OFF
|
|
-DSAIL_COMBINE_CODECS=ON
|
|
-DSAIL_ONLY_CODECS=${ONLY_CODECS_ESCAPED}
|
|
-DSAIL_BUILD_APPS=OFF
|
|
-DSAIL_BUILD_EXAMPLES=OFF
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
# Remove duplicate files
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
# Move cmake configs
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME sail CONFIG_PATH lib/cmake/sail DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcodecs CONFIG_PATH lib/cmake/sailcodecs DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcommon CONFIG_PATH lib/cmake/sailcommon DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME sailc++ CONFIG_PATH lib/cmake/sailc++ DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME sailmanip CONFIG_PATH lib/cmake/sailmanip DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
|
|
|
|
|
|
# Fix pkg-config files
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
# Unused because SAIL_COMBINE_CODECS is ON
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sail/sail-common/config.h" "#define SAIL_CODECS_PATH \"${CURRENT_PACKAGES_DIR}/lib/sail/codecs\"" "")
|
|
|
|
# Handle usage
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
# Handle copyright
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|