2021-11-10 03:44:57 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libjxl/libjxl
|
2022-11-04 06:14:09 +08:00
|
|
|
REF "v${VERSION}"
|
2024-03-14 06:50:15 +08:00
|
|
|
SHA512 1d19f30c0ae94e212326a15dc128612bce207e619c55c2a020401a27d01a933de71bb35e907521dc8fd853dd5578d74d74f7a5a282f0083fd22cf9cb07ccb96e
|
2021-11-10 03:44:57 +08:00
|
|
|
HEAD_REF main
|
|
|
|
PATCHES
|
|
|
|
fix-dependencies.patch
|
2024-03-14 06:50:15 +08:00
|
|
|
fix-tools-build.patch
|
2021-11-10 03:44:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools JPEGXL_ENABLE_TOOLS
|
2021-12-07 13:51:01 +08:00
|
|
|
INVERTED_FEATURES
|
|
|
|
tools CMAKE_DISABLE_FIND_PACKAGE_GIF
|
|
|
|
tools CMAKE_DISABLE_FIND_PACKAGE_JPEG
|
|
|
|
tools CMAKE_DISABLE_FIND_PACKAGE_PNG
|
|
|
|
tools CMAKE_DISABLE_FIND_PACKAGE_ZLIB
|
2021-11-10 03:44:57 +08:00
|
|
|
)
|
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2023-01-27 11:45:43 +08:00
|
|
|
string(APPEND VCPKG_C_FLAGS " /wd4146")
|
|
|
|
string(APPEND VCPKG_CXX_FLAGS " /wd4146")
|
2021-12-07 13:51:01 +08:00
|
|
|
endif()
|
|
|
|
|
2021-11-10 03:44:57 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2021-12-07 13:51:01 +08:00
|
|
|
"-DJPEGXL_VERSION=${JPEGXL_VERSION}"
|
|
|
|
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
|
2023-01-27 11:45:43 +08:00
|
|
|
-DJPEGXL_FORCE_SYSTEM_HWY=ON
|
2022-11-04 06:14:09 +08:00
|
|
|
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
|
2021-11-10 03:44:57 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DJPEGXL_ENABLE_BENCHMARK=OFF
|
2023-01-27 11:45:43 +08:00
|
|
|
-DJPEGXL_ENABLE_DOXYGEN=OFF
|
2021-11-10 03:44:57 +08:00
|
|
|
-DJPEGXL_ENABLE_EXAMPLES=OFF
|
2023-01-27 11:45:43 +08:00
|
|
|
-DJPEGXL_ENABLE_FUZZERS=OFF
|
2021-11-10 03:44:57 +08:00
|
|
|
-DJPEGXL_ENABLE_JNI=OFF
|
2023-01-27 11:45:43 +08:00
|
|
|
-DJPEGXL_ENABLE_MANPAGES=OFF
|
2021-11-10 03:44:57 +08:00
|
|
|
-DJPEGXL_ENABLE_OPENEXR=OFF
|
|
|
|
-DJPEGXL_ENABLE_PLUGINS=OFF
|
2023-01-27 11:45:43 +08:00
|
|
|
-DJPEGXL_ENABLE_SJPEG=OFF
|
2021-11-10 03:44:57 +08:00
|
|
|
-DJPEGXL_ENABLE_SKCMS=OFF
|
2021-12-07 13:51:01 +08:00
|
|
|
-DJPEGXL_ENABLE_TCMALLOC=OFF
|
2021-11-10 03:44:57 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2023-01-27 11:45:43 +08:00
|
|
|
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
|
2021-12-07 13:51:01 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_GIF
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_JPEG
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_PNG
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_ZLIB
|
2021-11-10 03:44:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
if(JPEGXL_ENABLE_TOOLS)
|
2022-11-04 06:14:09 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES cjxl djxl cjpeg_hdr jxlinfo AUTO_CLEAN)
|
2021-11-10 03:44:57 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-01-26 04:22:21 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|