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}"
|
2023-01-26 04:22:21 +08:00
|
|
|
SHA512 ef472ddc5e277f3d41491c2acc03ed0152ec3ea87efb9e3320cfd830ceb383728658318444b06a3e9f8662bc11c0014675966572ce33f49c8e5cb13c5ed48de1
|
2021-11-10 03:44:57 +08:00
|
|
|
HEAD_REF main
|
|
|
|
PATCHES
|
|
|
|
fix-dependencies.patch
|
2023-01-27 11:45:43 +08:00
|
|
|
trim-shared-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")
|