2022-11-04 06:14:09 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2022-11-04 06:14:09 +08:00
|
|
|
set(SHARED_LIBRARY_PATCH "fix-shared-library.patch")
|
2019-10-08 01:35:13 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2017-08-20 04:29:24 +08:00
|
|
|
REPO mm2/Little-CMS
|
2022-11-04 06:14:09 +08:00
|
|
|
REF "lcms${VERSION}"
|
|
|
|
SHA512 fc45f2ce0bf752313369786b65b92443ef6d9ed7e264e22cfe2a4732b370f6bb6e5573b646d0e8edf1b0bf9b9bc5137c98aed5929ba75acdf157d2764bd838fa
|
2018-08-08 13:50:51 +08:00
|
|
|
HEAD_REF master
|
2019-10-08 01:35:13 +08:00
|
|
|
PATCHES
|
|
|
|
remove_library_directive.patch
|
2022-11-04 06:14:09 +08:00
|
|
|
${SHARED_LIBRARY_PATCH}
|
|
|
|
remove-register.patch
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2016-12-14 22:58:00 +08:00
|
|
|
|
2021-09-08 06:19:07 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2016-12-14 22:58:00 +08:00
|
|
|
|
2021-09-24 02:00:41 +08:00
|
|
|
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
|
|
|
|
vcpkg_cmake_install()
|
2016-12-14 22:58:00 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2021-09-24 02:00:41 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME lcms2)
|
|
|
|
vcpkg_cmake_config_fixup() # provides old PACKAGE_NAME lcms
|
2021-09-08 06:19:07 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-09-24 02:00:41 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/lcms/lcms-config.cmake" [[
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(lcms2 CONFIG)
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/lcms-targets.cmake)
|
|
|
|
]])
|
2017-01-30 22:22:39 +08:00
|
|
|
|
2021-09-08 06:19:07 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2021-09-24 02:00:41 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|