mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 03:09:00 +08:00
[libjxl][lcms][highway] update to latest version (#27593)
* [highway] update to 1.0.2 * [lcms] update to 2.14 * [libjxl] update to 0.7.0
This commit is contained in:
parent
c5fb4ecf7f
commit
e3a3942a9e
@ -1,17 +1,24 @@
|
||||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/highway
|
||||
REF 0.14.2
|
||||
SHA512 fc1a35463c95c45b646c53f91a9996112726de1d588dcd4d25a7d366840f704ad9a4c0bb6e0a001e929409f04aad6922cbffcf93774a0c360aff875956c7cc8d
|
||||
REF ${VERSION}
|
||||
SHA512 d4c57b297f073dd83535c60151bbc7e7960262990d89bc78882adeb457ed7cf6d54ec852ecb1847c7760de3992267b66538971d20a2c2935828d95d99ddb3a3f
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
contrib HWY_ENABLE_CONTRIB
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
-DHWY_ENABLE_EXAMPLES=OFF
|
||||
-DHWY_ENABLE_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "highway",
|
||||
"version-semver": "0.14.2",
|
||||
"version-semver": "1.0.2",
|
||||
"description": "Performance-portable, length-agnostic SIMD with runtime dispatch",
|
||||
"homepage": "https://github.com/google/highway",
|
||||
"license": "Apache-2.0",
|
||||
@ -9,5 +9,11 @@
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"contrib": {
|
||||
"description": "SIMD related utility functions",
|
||||
"supports": "!uwp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,11 @@ file(GLOB SRCS src/*.c)
|
||||
add_library(lcms2 ${SRCS} src/lcms2.def)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_options(lcms2 PRIVATE -DCMS_DLL_BUILD)
|
||||
target_compile_options(lcms2 PUBLIC -DCMS_DLL)
|
||||
target_compile_definitions(lcms2 PRIVATE CMS_DLL_BUILD)
|
||||
target_compile_definitions(lcms2 PUBLIC CMS_DLL)
|
||||
endif()
|
||||
target_compile_options(lcms2 PRIVATE -DUNICODE -D_UNICODE)
|
||||
target_compile_definitions(lcms2 PRIVATE UNICODE _UNICODE)
|
||||
target_compile_definitions(lcms2 PUBLIC CMS_NO_REGISTER_KEYWORD)
|
||||
|
||||
target_include_directories(lcms2 PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
set_target_properties(lcms2 PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_LIST_DIR}/include/lcms2.h;${CMAKE_CURRENT_LIST_DIR}/include/lcms2_plugin.h")
|
||||
|
12
ports/lcms/fix-shared-library.patch
Normal file
12
ports/lcms/fix-shared-library.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/include/lcms2.h b/include/lcms2.h
|
||||
index fd4ac7c..a99bdd2 100644
|
||||
--- a/include/lcms2.h
|
||||
+++ b/include/lcms2.h
|
||||
@@ -227,6 +227,7 @@ typedef int cmsBool;
|
||||
|
||||
|
||||
// Calling convention -- this is hardly platform and compiler dependent
|
||||
+#define CMS_DLL
|
||||
#ifdef CMS_IS_WINDOWS_
|
||||
# if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
|
||||
# ifdef __BORLANDC__
|
@ -1,17 +1,19 @@
|
||||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(ADDITIONAL_PATCH "shared.patch")
|
||||
set(SHARED_LIBRARY_PATCH "fix-shared-library.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mm2/Little-CMS
|
||||
REF 924a020d09bfe468c665467caf24aadeb41ff77c # 2.12
|
||||
SHA512 0c2dc069878ca38a92af4800aa3fb2660203fbcdf6dccd9db60cfacb6896185e3e9222893f39ec3e132b0f4900a2932d490dd8db5b1b431519966a64d28404d2
|
||||
REF "lcms${VERSION}"
|
||||
SHA512 fc45f2ce0bf752313369786b65b92443ef6d9ed7e264e22cfe2a4732b370f6bb6e5573b646d0e8edf1b0bf9b9bc5137c98aed5929ba75acdf157d2764bd838fa
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
remove_library_directive.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
cpp17.patch
|
||||
${SHARED_LIBRARY_PATCH}
|
||||
remove-register.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
@ -1,13 +1,13 @@
|
||||
diff --git a/include/lcms2.h b/include/lcms2.h
|
||||
index 7e061ce7c..5d234c4e4 100644
|
||||
index fd4ac7c..b5532a9 100644
|
||||
--- a/include/lcms2.h
|
||||
+++ b/include/lcms2.h
|
||||
@@ -152,7 +152,7 @@ typedef double cmsFloat64Number;
|
||||
#endif
|
||||
|
||||
// Handle "register" keyword
|
||||
-#if defined(CMS_NO_REGISTER_KEYWORD) && !defined(CMS_DLL) && !defined(CMS_DLL_BUILD)
|
||||
+#if __cplusplus >= 201703L || defined(CMS_NO_REGISTER_KEYWORD) && !defined(CMS_DLL) && !defined(CMS_DLL_BUILD)
|
||||
-#if defined(CMS_NO_REGISTER_KEYWORD)
|
||||
+#if __cplusplus >= 201703L || defined(CMS_NO_REGISTER_KEYWORD)
|
||||
# define CMSREGISTER
|
||||
#else
|
||||
# define CMSREGISTER register
|
@ -1,6 +1,8 @@
|
||||
--- a/src/lcms2.def 2016-07-20 09:46:01.000000000 +0200
|
||||
+++ b/src/lcms2.def 2018-06-02 02:11:04.135781600 +0200
|
||||
@@ -1,5 +1,3 @@
|
||||
diff --git a/src/lcms2.def b/src/lcms2.def
|
||||
index f3e4779..9bf2a4f 100644
|
||||
--- a/src/lcms2.def
|
||||
+++ b/src/lcms2.def
|
||||
@@ -1,5 +1,3 @@
|
||||
-LIBRARY LCMS2.DLL
|
||||
-
|
||||
EXPORTS
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- a/include/lcms2.h Wed Jul 20 08:46:01 2016
|
||||
+++ b/include/lcms2.h Mon Jan 30 15:01:12 2017
|
||||
@@ -212,6 +212,7 @@
|
||||
|
||||
#endif // CMS_USE_BIG_ENDIAN
|
||||
|
||||
+#define CMS_DLL
|
||||
|
||||
// Calling convention -- this is hardly platform and compiler dependent
|
||||
#ifdef CMS_IS_WINDOWS_
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "lcms",
|
||||
"version": "2.12",
|
||||
"port-version": 4,
|
||||
"version": "2.14",
|
||||
"description": "Little CMS.",
|
||||
"homepage": "https://github.com/mm2/Little-CMS",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index a366e51..257f87d 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -132,7 +132,9 @@ endif() #!MSVC
|
||||
include(jxl.cmake)
|
||||
|
||||
# Other libraries outside the core jxl library.
|
||||
+if(JPEGXL_ENABLE_TOOLS)
|
||||
include(jxl_extras.cmake)
|
||||
+endif()
|
||||
include(jxl_threads.cmake)
|
||||
|
||||
# Install all the library headers from the source and the generated ones. There
|
@ -1,13 +1,11 @@
|
||||
diff --git a/lib/jxl.cmake b/lib/jxl.cmake
|
||||
index 72c07f4..5675d1e 100644
|
||||
--- a/lib/jxl.cmake
|
||||
+++ b/lib/jxl.cmake
|
||||
@@ -3,6 +3,18 @@
|
||||
@@ -3,6 +3,15 @@
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
+if(JPEGXL_ENABLE_TOOLS)
|
||||
+find_package(lodepng CONFIG REQUIRED)
|
||||
+endif()
|
||||
|
||||
+find_package(unofficial-brotli CONFIG REQUIRED)
|
||||
+find_package(lcms2 CONFIG REQUIRED)
|
||||
+
|
||||
@ -21,94 +19,17 @@ diff --git a/lib/jxl.cmake b/lib/jxl.cmake
|
||||
# by the encoder: the encoder uses both dec and enc ourse files, while the
|
||||
# decoder uses only dec source files.
|
||||
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
|
||||
index 50cc72c..fed027e 100644
|
||||
--- a/third_party/CMakeLists.txt
|
||||
+++ b/third_party/CMakeLists.txt
|
||||
@@ -88,18 +88,16 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/highway/CMakeLists.txt" AND
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/highway/LICENSE"
|
||||
${PROJECT_BINARY_DIR}/LICENSE.highway COPYONLY)
|
||||
else()
|
||||
- pkg_check_modules(HWY libhwy)
|
||||
- if (NOT HWY_FOUND)
|
||||
+ find_path(HWY_INCLUDE_DIRS "hwy/highway.h")
|
||||
+ find_library(HWY_LINK_LIBRARIES hwy)
|
||||
+ if (NOT HWY_INCLUDE_DIRS OR NOT HWY_LINK_LIBRARIES)
|
||||
message(FATAL_ERROR
|
||||
- "Highway library (hwy) not found. Install libhwy-dev or download it "
|
||||
- "to third_party/highway from https://github.com/google/highway . "
|
||||
- "Highway is required to build JPEG XL. You can run "
|
||||
- "${PROJECT_SOURCE_DIR}/deps.sh to download this dependency.")
|
||||
+ "Highway library (hwy) not found.")
|
||||
endif()
|
||||
add_library(hwy INTERFACE IMPORTED GLOBAL)
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.13.5")
|
||||
- set_property(TARGET hwy PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${HWY_INCLUDE_DIR})
|
||||
- target_link_libraries(hwy INTERFACE ${HWY_LDFLAGS})
|
||||
+ set_property(TARGET hwy PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${HWY_INCLUDE_DIRS})
|
||||
+ target_link_libraries(hwy INTERFACE ${HWY_LINK_LIBRARIES})
|
||||
set_property(TARGET hwy PROPERTY INTERFACE_COMPILE_OPTIONS ${HWY_CFLAGS_OTHER})
|
||||
else()
|
||||
target_include_directories(hwy INTERFACE ${HWY_INCLUDE_DIRS})
|
||||
@@ -114,82 +112,12 @@ else()
|
||||
@@ -45,36 +45,7 @@ else()
|
||||
endif()
|
||||
|
||||
# lodepng
|
||||
-if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lodepng/lodepng.h" )
|
||||
- message(FATAL_ERROR "Please run ${PROJECT_SOURCE_DIR}/deps.sh to fetch the "
|
||||
- "build dependencies.")
|
||||
-endif()
|
||||
-include(lodepng.cmake)
|
||||
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lodepng/LICENSE"
|
||||
- ${PROJECT_BINARY_DIR}/LICENSE.lodepng COPYONLY)
|
||||
+if(JPEGXL_ENABLE_TOOLS)
|
||||
+find_package(lodepng CONFIG REQUIRED)
|
||||
+endif()
|
||||
|
||||
# brotli
|
||||
-if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/brotli/c/include/brotli/decode.h" OR
|
||||
- JPEGXL_FORCE_SYSTEM_BROTLI)
|
||||
- # Create the libbrotli* and libbrotli*-static targets.
|
||||
- foreach(brlib IN ITEMS brotlienc brotlidec brotlicommon)
|
||||
- # Use uppercase like "BROTLIENC" for the cmake variables
|
||||
- string(TOUPPER "${brlib}" BRPREFIX)
|
||||
- pkg_check_modules(${BRPREFIX} lib${brlib})
|
||||
- if (${BRPREFIX}_FOUND)
|
||||
- if(${CMAKE_VERSION} VERSION_LESS "3.13.5")
|
||||
- add_library(${brlib} INTERFACE IMPORTED GLOBAL)
|
||||
- set_property(TARGET ${brlib} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${${BRPREFIX}_INCLUDE_DIR})
|
||||
- target_link_libraries(${brlib} INTERFACE ${${BRPREFIX}_LDFLAGS})
|
||||
- set_property(TARGET ${brlib} PROPERTY INTERFACE_COMPILE_OPTIONS ${${BRPREFIX}_CFLAGS_OTHER})
|
||||
-
|
||||
- add_library(${brlib}-static INTERFACE IMPORTED GLOBAL)
|
||||
- set_property(TARGET ${brlib}-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${${BRPREFIX}_INCLUDE_DIR})
|
||||
- target_link_libraries(${brlib}-static INTERFACE ${${BRPREFIX}_LDFLAGS})
|
||||
- set_property(TARGET ${brlib}-static PROPERTY INTERFACE_COMPILE_OPTIONS ${${BRPREFIX}_CFLAGS_OTHER})
|
||||
- else()
|
||||
- add_library(${brlib} INTERFACE IMPORTED GLOBAL)
|
||||
- target_include_directories(${brlib}
|
||||
- INTERFACE ${${BRPREFIX}_INCLUDE_DIRS})
|
||||
- target_link_libraries(${brlib}
|
||||
- INTERFACE ${${BRPREFIX}_LINK_LIBRARIES})
|
||||
- target_link_options(${brlib}
|
||||
- INTERFACE ${${BRPREFIX}_LDFLAGS_OTHER})
|
||||
- target_compile_options(${brlib}
|
||||
- INTERFACE ${${BRPREFIX}_CFLAGS_OTHER})
|
||||
-
|
||||
- # TODO(deymo): Remove the -static library versions, this target is
|
||||
- # currently needed by brunsli.cmake. When importing it this way, the
|
||||
- # brotli*-static target is just an alias.
|
||||
- add_library(${brlib}-static ALIAS ${brlib})
|
||||
- endif()
|
||||
- endif()
|
||||
- unset(BRPREFIX)
|
||||
- endforeach()
|
||||
-
|
||||
- if (BROTLIENC_FOUND AND BROTLIDEC_FOUND AND BROTLICOMMON_FOUND)
|
||||
- set(BROTLI_FOUND 1)
|
||||
- else()
|
||||
- set(BROTLI_FOUND 0)
|
||||
- endif()
|
||||
-
|
||||
- if (NOT BROTLI_FOUND)
|
||||
- find_package(Brotli)
|
||||
- if (NOT Brotli_FOUND)
|
||||
- message(FATAL_ERROR
|
||||
- "Brotli not found, install brotli-dev or download brotli source code to"
|
||||
- " third_party/brotli from https://github.com/google/brotli. You can use"
|
||||
@ -121,7 +42,11 @@ diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
|
||||
-else()
|
||||
- # Compile brotli from sources.
|
||||
- set(BROTLI_DISABLE_TESTS ON CACHE STRING "Disable Brotli tests")
|
||||
- add_subdirectory(brotli EXCLUDE_FROM_ALL)
|
||||
- # Override default "no-install" policy.
|
||||
- if((NOT SANITIZER STREQUAL "asan") AND (NOT SANITIZER STREQUAL "msan"))
|
||||
- set(BROTLI_BUNDLED_MODE OFF CACHE INTERNAL "")
|
||||
- endif()
|
||||
- add_subdirectory(brotli)
|
||||
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/brotli/LICENSE"
|
||||
- ${PROJECT_BINARY_DIR}/LICENSE.brotli COPYONLY)
|
||||
- if(BROTLI_EMSCRIPTEN)
|
||||
@ -135,17 +60,23 @@ diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
|
||||
|
||||
# *cms
|
||||
if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
|
||||
@@ -202,12 +128,7 @@ if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
|
||||
@@ -86,18 +57,7 @@ if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/skcms/LICENSE"
|
||||
${PROJECT_BINARY_DIR}/LICENSE.skcms COPYONLY)
|
||||
endif ()
|
||||
if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS)
|
||||
- if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" )
|
||||
- message(SEND_ERROR "Please run git submodule update --init")
|
||||
-if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS)
|
||||
- if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" OR JPEGXL_FORCE_SYSTEM_LCMS2 )
|
||||
- find_package(LCMS2 2.13)
|
||||
- if ( NOT LCMS2_FOUND )
|
||||
- message(FATAL_ERROR "Please install lcms2 or run git submodule update --init")
|
||||
- endif ()
|
||||
- else()
|
||||
- include(lcms2.cmake)
|
||||
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lcms/COPYING"
|
||||
- ${PROJECT_BINARY_DIR}/LICENSE.lcms COPYONLY)
|
||||
- endif()
|
||||
- include(lcms2.cmake)
|
||||
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lcms/COPYING"
|
||||
- ${PROJECT_BINARY_DIR}/LICENSE.lcms COPYONLY)
|
||||
+ find_package(lcms2 CONFIG REQUIRED)
|
||||
endif()
|
||||
-endif()
|
||||
+find_package(lcms2 CONFIG REQUIRED)
|
||||
|
||||
# sjpeg
|
||||
# libpng
|
||||
if (JPEGXL_EMSCRIPTEN)
|
||||
|
@ -1,36 +0,0 @@
|
||||
diff --git a/lib/jxl.cmake b/lib/jxl.cmake
|
||||
--- a/lib/jxl.cmake
|
||||
+++ b/lib/jxl.cmake
|
||||
@@ -487,8 +487,8 @@ if (NOT WIN32)
|
||||
set_target_properties(jxl-static PROPERTIES OUTPUT_NAME "jxl")
|
||||
set_target_properties(jxl_dec-static PROPERTIES OUTPUT_NAME "jxl_dec")
|
||||
endif()
|
||||
-install(TARGETS jxl-static DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
-install(TARGETS jxl_dec-static DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(TARGETS jxl-static)
|
||||
+install(TARGETS jxl_dec-static)
|
||||
|
||||
if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR
|
||||
TARGET_SUPPORTS_SHARED_LIBS) AND NOT JPEGXL_STATIC)
|
||||
@@ -548,8 +548,7 @@ endforeach()
|
||||
# Only install libjxl shared library. The libjxl_dec is not installed since it
|
||||
# contains symbols also in libjxl which would conflict if programs try to use
|
||||
# both.
|
||||
-install(TARGETS jxl
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(TARGETS jxl)
|
||||
else()
|
||||
add_library(jxl ALIAS jxl-static)
|
||||
add_library(jxl_dec ALIAS jxl_dec-static)
|
||||
diff --git a/lib/jxl_threads.cmake b/lib/jxl_threads.cmake
|
||||
--- a/lib/jxl_threads.cmake
|
||||
+++ b/lib/jxl_threads.cmake
|
||||
@@ -43,7 +43,7 @@ set_target_properties(${_target} PROPERTIES
|
||||
if (NOT WIN32)
|
||||
set_target_properties(${_target} PROPERTIES OUTPUT_NAME "jxl_threads")
|
||||
endif()
|
||||
-install(TARGETS ${_target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(TARGETS ${_target})
|
||||
|
||||
endfunction()
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff --git a/lib/jxl.cmake b/lib/jxl.cmake
|
||||
index 63539cc..2e1d617 100644
|
||||
--- a/lib/jxl.cmake
|
||||
+++ b/lib/jxl.cmake
|
||||
@@ -551,8 +551,10 @@ foreach(target IN ITEMS jxl jxl_dec)
|
||||
# This hides the default visibility symbols from static libraries bundled into
|
||||
# the shared library. In particular this prevents exposing symbols from hwy
|
||||
# and skcms in the shared library.
|
||||
+ if(NOT APPLE AND NOT MSVC)
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,--exclude-libs=ALL")
|
||||
+ endif()
|
||||
endforeach()
|
||||
|
||||
# Only install libjxl shared library. The libjxl_dec is not installed since it
|
@ -1,16 +1,13 @@
|
||||
set(JPEGXL_VERSION 0.6.1)
|
||||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libjxl/libjxl
|
||||
REF "v${JPEGXL_VERSION}"
|
||||
SHA512 302935d722160b0b288ac63301f9e95caf82eccf6ad76c4f4da6316a0314ee3562115932b1ceacb0d02708de0a07788992d3478cae73af0b90193f5769f9fb52
|
||||
REF "v${VERSION}"
|
||||
SHA512 c73039606acf7b2cbc331c6787af5167d711fd1af22bc616e1f478c531b087da82c98f2cb7e88c4d1f8bcfdc4e053ae0dc99cc9a811545b7f9658041489ed04b
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-install-directories.patch
|
||||
fix-dependencies.patch
|
||||
fix-link-flags.patch
|
||||
disable-jxl_extras.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -49,6 +46,7 @@ vcpkg_cmake_configure(
|
||||
"-DJPEGXL_VERSION=${JPEGXL_VERSION}"
|
||||
-DJPEGXL_FORCE_SYSTEM_HWY=ON
|
||||
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
|
||||
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
|
||||
${FEATURE_OPTIONS}
|
||||
-DJPEGXL_ENABLE_FUZZERS=OFF
|
||||
-DJPEGXL_ENABLE_MANPAGES=OFF
|
||||
@ -74,31 +72,11 @@ vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(JPEGXL_ENABLE_TOOLS)
|
||||
vcpkg_copy_tools(TOOL_NAMES cjxl djxl AUTO_CLEAN)
|
||||
vcpkg_copy_tools(TOOL_NAMES cjxl djxl cjpeg_hdr jxlinfo AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
# libjxl always builds static and dynamic libraries, so we delete the variant that we don't need
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/bin"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
||||
)
|
||||
set(FILES_TO_REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/lib/jxl.lib"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/jxl_threads.lib"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/jxl.lib"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/jxl_threads.lib"
|
||||
)
|
||||
else()
|
||||
file(GLOB FILES_TO_REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/lib/*.so*"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/*.dylib*"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/*.so*"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/*.dylib*"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# libjxl always builds static libraries, so we delete them if we don't need them.
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
file(GLOB FILES_TO_REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/lib/*-static.lib"
|
||||
@ -110,8 +88,8 @@ else()
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/*.a"
|
||||
)
|
||||
endif()
|
||||
file(REMOVE ${FILES_TO_REMOVE})
|
||||
endif()
|
||||
file(REMOVE ${FILES_TO_REMOVE})
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "libjxl",
|
||||
"version-semver": "0.6.1",
|
||||
"port-version": 1,
|
||||
"version-semver": "0.7.0",
|
||||
"description": "JPEG XL image format reference implementation",
|
||||
"homepage": "https://github.com/libjxl/libjxl",
|
||||
"license": "BSD-3-Clause",
|
||||
@ -21,7 +20,6 @@
|
||||
"giflib",
|
||||
"libjpeg-turbo",
|
||||
"libpng",
|
||||
"lodepng",
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
|
@ -2905,7 +2905,7 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"highway": {
|
||||
"baseline": "0.14.2",
|
||||
"baseline": "1.0.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"hikogui": {
|
||||
@ -3501,8 +3501,8 @@
|
||||
"port-version": 5
|
||||
},
|
||||
"lcms": {
|
||||
"baseline": "2.12",
|
||||
"port-version": 4
|
||||
"baseline": "2.14",
|
||||
"port-version": 0
|
||||
},
|
||||
"leaf": {
|
||||
"baseline": "0.2.2",
|
||||
@ -3869,8 +3869,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"libjxl": {
|
||||
"baseline": "0.6.1",
|
||||
"port-version": 1
|
||||
"baseline": "0.7.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libkeyfinder": {
|
||||
"baseline": "2.2.6",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0062f27986b38db6f1e46e3118bef2cdfdd0450f",
|
||||
"version-semver": "1.0.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "5167bd4fba072a5f09398d913d5e575241c67c5e",
|
||||
"version-semver": "0.14.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d5fb3c46f4b60d45e67444591a83d80c08100871",
|
||||
"version": "2.14",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "220d2255b3f13ec7b0266393d65c674f5c060c2b",
|
||||
"version": "2.12",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1012fef90a25836b40b40275eb7e4ccde46d0521",
|
||||
"version-semver": "0.7.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "ebfc043511f10c6dbe25a298b403b56ef9a57f87",
|
||||
"version-semver": "0.6.1",
|
||||
|
Loading…
Reference in New Issue
Block a user