2021-11-09 20:44:57 +01:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libjxl/libjxl
|
2022-11-03 23:14:09 +01:00
|
|
|
REF "v${VERSION}"
|
2024-03-13 15:50:15 -07:00
|
|
|
SHA512 1d19f30c0ae94e212326a15dc128612bce207e619c55c2a020401a27d01a933de71bb35e907521dc8fd853dd5578d74d74f7a5a282f0083fd22cf9cb07ccb96e
|
2021-11-09 20:44:57 +01:00
|
|
|
HEAD_REF main
|
|
|
|
PATCHES
|
|
|
|
fix-dependencies.patch
|
2024-03-13 15:50:15 -07:00
|
|
|
fix-tools-build.patch
|
2021-11-09 20:44:57 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools JPEGXL_ENABLE_TOOLS
|
2021-12-07 06:51:01 +01: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-09 20:44:57 +01:00
|
|
|
)
|
|
|
|
|
2021-12-07 06:51:01 +01:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2023-01-27 04:45:43 +01:00
|
|
|
string(APPEND VCPKG_C_FLAGS " /wd4146")
|
|
|
|
string(APPEND VCPKG_CXX_FLAGS " /wd4146")
|
2021-12-07 06:51:01 +01:00
|
|
|
endif()
|
|
|
|
|
2021-11-09 20:44:57 +01:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2021-12-07 06:51:01 +01:00
|
|
|
"-DJPEGXL_VERSION=${JPEGXL_VERSION}"
|
|
|
|
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
|
2023-01-27 04:45:43 +01:00
|
|
|
-DJPEGXL_FORCE_SYSTEM_HWY=ON
|
2022-11-03 23:14:09 +01:00
|
|
|
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
|
2021-11-09 20:44:57 +01:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DJPEGXL_ENABLE_BENCHMARK=OFF
|
2023-01-27 04:45:43 +01:00
|
|
|
-DJPEGXL_ENABLE_DOXYGEN=OFF
|
2021-11-09 20:44:57 +01:00
|
|
|
-DJPEGXL_ENABLE_EXAMPLES=OFF
|
2023-01-27 04:45:43 +01:00
|
|
|
-DJPEGXL_ENABLE_FUZZERS=OFF
|
2021-11-09 20:44:57 +01:00
|
|
|
-DJPEGXL_ENABLE_JNI=OFF
|
2023-01-27 04:45:43 +01:00
|
|
|
-DJPEGXL_ENABLE_MANPAGES=OFF
|
2021-11-09 20:44:57 +01:00
|
|
|
-DJPEGXL_ENABLE_OPENEXR=OFF
|
|
|
|
-DJPEGXL_ENABLE_PLUGINS=OFF
|
2023-01-27 04:45:43 +01:00
|
|
|
-DJPEGXL_ENABLE_SJPEG=OFF
|
2021-11-09 20:44:57 +01:00
|
|
|
-DJPEGXL_ENABLE_SKCMS=OFF
|
2021-12-07 06:51:01 +01:00
|
|
|
-DJPEGXL_ENABLE_TCMALLOC=OFF
|
2021-11-09 20:44:57 +01:00
|
|
|
-DBUILD_TESTING=OFF
|
2023-01-27 04:45:43 +01:00
|
|
|
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
|
2024-05-17 23:34:35 +02:00
|
|
|
-DJPEGXL_BUNDLE_LIBPNG=OFF
|
2021-12-07 06:51:01 +01: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-09 20:44:57 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
if(JPEGXL_ENABLE_TOOLS)
|
2024-04-25 06:18:20 -07:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES cjxl djxl jxlinfo AUTO_CLEAN)
|
2021-11-09 20:44:57 +01:00
|
|
|
endif()
|
|
|
|
|
2024-03-22 03:32:31 +01:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/jxl/jxl_export.h" "ifdef JXL_STATIC_DEFINE" "if 1")
|
|
|
|
endif()
|
|
|
|
|
2021-11-09 20:44:57 +01:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-01-25 21:22:21 +01:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|