-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b987d2
commit 4fbfcff
Showing
10 changed files
with
113 additions
and
108 deletions.
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,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