-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lcms] Update to v2.16 #42187
Open
donny-dont
wants to merge
2
commits into
microsoft:master
Choose a base branch
from
donny-dont:lcms-2.16
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[lcms] Update to v2.16 #42187
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
diff --git a/include/lcms2.h b/include/lcms2.h | ||
index fd4ac7c..a99bdd2 100644 | ||
index 7c72047..6306027 100644 | ||
--- a/include/lcms2.h | ||
+++ b/include/lcms2.h | ||
@@ -227,6 +227,7 @@ typedef int cmsBool; | ||
@@ -230,6 +230,7 @@ typedef int cmsBool; | ||
|
||
|
||
// Calling convention -- this is hardly platform and compiler dependent | ||
+#define CMS_DLL | ||
#ifdef CMS_IS_WINDOWS_ | ||
#if defined(CMS_IS_WINDOWS_) && !defined(__GNUC__) | ||
# if defined(CMS_DLL) || defined(CMS_DLL_BUILD) | ||
# ifdef __BORLANDC__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if(NOT TARGET lcms::lcms) | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(lcms2 CONFIG) | ||
|
||
# Create imported target lcms::lcms | ||
add_library(lcms::lcms INTERFACE IMPORTED) | ||
|
||
set_target_properties(lcms::lcms PROPERTIES | ||
INTERFACE_LINK_LIBRARIES "lcms2::lcms2" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if(NOT TARGET lcms2::lcms2) | ||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | ||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | ||
|
||
add_library(lcms2::lcms2 UNKNOWN IMPORTED) | ||
|
||
set_target_properties(lcms2::lcms2 PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" | ||
) | ||
|
||
find_library(LCMS2_LIBRARY_DEBUG NAMES lcms2 PATHS "${_IMPORT_PREFIX}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) | ||
if(EXISTS "${LCMS2_LIBRARY_DEBUG}") | ||
set_property(TARGET lcms2::lcms2 APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug") | ||
set_target_properties(lcms2::lcms2 PROPERTIES IMPORTED_LOCATION_DEBUG "${LCMS2_LIBRARY_DEBUG}") | ||
endif() | ||
|
||
find_library(LCMS2_LIBRARY_RELEASE NAMES lcms2 PATHS "${_IMPORT_PREFIX}/" PATH_SUFFIXES lib NO_DEFAULT_PATH) | ||
if(EXISTS "${LCMS2_LIBRARY_RELEASE}") | ||
set_property(TARGET lcms2::lcms2 APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release") | ||
set_target_properties(lcms2::lcms2 PROPERTIES IMPORTED_LOCATION_RELEASE "${LCMS2_LIBRARY_RELEASE}") | ||
endif() | ||
|
||
unset(_IMPORT_PREFIX) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,61 @@ | ||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) | ||
set(SHARED_LIBRARY_PATCH "fix-shared-library.patch") | ||
endif() | ||
|
||
vcpkg_download_distfile(ADD_MISSING_EXPORT_PATCH | ||
URLS https://github.com/mm2/Little-CMS/commit/f7b3c637c20508655f8b49935a4b556d52937b69.diff?full_index=1 | ||
FILENAME Add-missing-export.patch | ||
SHA512 4a78f55c07fe5cef5fb9174d466672371283301df89e2825fc47d9fd4c526b291dce11d3896401a3284f4e2093e285c9e5ccbe0011e132576d189e70f66a1325 | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO mm2/Little-CMS | ||
REF "lcms${VERSION}" | ||
SHA512 fc45f2ce0bf752313369786b65b92443ef6d9ed7e264e22cfe2a4732b370f6bb6e5573b646d0e8edf1b0bf9b9bc5137c98aed5929ba75acdf157d2764bd838fa | ||
SHA512 c0d857123a0168cb76b5944a20c9e3de1cbe74e2b509fb72a54f74543e9c173474f09d50c495b0a0a295a3c2b47c5fa54a330d057e1a59b5a7e36d3f5a7f81b2 | ||
HEAD_REF master | ||
PATCHES | ||
remove_library_directive.patch | ||
${SHARED_LIBRARY_PATCH} | ||
remove-register.patch | ||
${ADD_MISSING_EXPORT_PATCH} | ||
) | ||
|
||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") | ||
|
||
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") | ||
vcpkg_cmake_install() | ||
if("fastfloat" IN_LIST FEATURES) | ||
list(APPEND OPTIONS -Dfastfloat=true) | ||
else() | ||
list(APPEND OPTIONS -Dfastfloat=false) | ||
endif() | ||
if("threaded" IN_LIST FEATURES) | ||
list(APPEND OPTIONS -Dthreaded=true) | ||
else() | ||
list(APPEND OPTIONS -Dthreaded=false) | ||
endif() | ||
if("tools" IN_LIST FEATURES) | ||
list(APPEND OPTIONS -Dutils=true) | ||
else() | ||
list(APPEND OPTIONS -Dutils=false) | ||
endif() | ||
|
||
vcpkg_copy_pdbs() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME lcms2) | ||
vcpkg_cmake_config_fixup() # provides old PACKAGE_NAME lcms | ||
vcpkg_configure_meson( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
${OPTIONS} | ||
-Dsamples=false | ||
) | ||
vcpkg_install_meson() | ||
vcpkg_fixup_pkgconfig() | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/lcms/lcms-config.cmake" [[ | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(lcms2 CONFIG) | ||
include(${CMAKE_CURRENT_LIST_DIR}/lcms-targets.cmake) | ||
]]) | ||
|
||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||
|
||
if("tools" IN_LIST FEATURES) | ||
vcpkg_copy_tools( | ||
TOOL_NAMES jpgicc linkicc psicc tificc transicc | ||
AUTO_CLEAN | ||
) | ||
endif() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/lcms-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/lcms2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/lcms2") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
The package lcms provides CMake targets: | ||
|
||
find_package(lcms2 CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE lcms2::lcms2) | ||
The package lcms provides CMake targets: | ||
find_package(lcms2 CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE lcms2::lcms2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
{ | ||
"name": "lcms", | ||
"version": "2.14", | ||
"version": "2.16", | ||
"description": "Little CMS.", | ||
"homepage": "https://github.com/mm2/Little-CMS", | ||
"license": "MIT", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"name": "vcpkg-tool-meson", | ||
"host": true | ||
} | ||
], | ||
"features": { | ||
"fastfloat": { | ||
"description": "Build the fast float plugin", | ||
"supports": "!(x86 & windows)", | ||
"license": "GPL-3.0-or-later" | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
"threaded": { | ||
"description": "Build the multi threaded plugin", | ||
"license": "GPL-3.0-or-later" | ||
}, | ||
"tools": { | ||
"description": "Build the utilities", | ||
"dependencies": [ | ||
"libjpeg-turbo", | ||
{ | ||
"name": "tiff", | ||
"default-features": false | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the meson options https://github.com/mm2/Little-CMS/blob/lcms2.16/meson_options.txt