This commit is contained in:
Todor Prokopov 2022-11-23 20:35:36 +02:00 коммит произвёл GitHub
Родитель cb76ac9e92
Коммит 5fe0ac056c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 142 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,13 @@
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt
index 854674d..d62176b 100644
--- a/backend/CMakeLists.txt
+++ b/backend/CMakeLists.txt
@@ -13,7 +13,7 @@ set(zint_TWODIM_SRCS code16k.c codablock.c dmatrix.c pdf417.c qr.c maxicode.c co
set(zint_OUTPUT_SRCS vector.c ps.c svg.c emf.c bmp.c pcx.c gif.c png.c tif.c raster.c output.c)
set(zint_SRCS ${zint_OUTPUT_SRCS} ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint_TWODIM_SRCS})
-add_library(zint SHARED ${zint_SRCS})
+add_library(zint ${zint_SRCS})
if(WIN32)
target_sources(${PROJECT_NAME} PRIVATE libzint.rc)

Просмотреть файл

@ -0,0 +1,28 @@
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt
index 854674d..f61a294 100644
--- a/backend/CMakeLists.txt
+++ b/backend/CMakeLists.txt
@@ -47,7 +47,7 @@ endif()
if(ZINT_USE_PNG AND PNG_FOUND)
zint_target_link_libraries(PNG::PNG)
else()
- zint_target_compile_definitions(PUBLIC NO_PNG)
+ zint_target_compile_definitions(PRIVATE NO_PNG)
endif()
if(ZINT_TEST)
@@ -63,7 +63,13 @@ if(MSVC)
target_compile_definitions(zint PRIVATE DLL_EXPORT)
endif()
-install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS})
+target_include_directories(zint PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
+)
+
+install(TARGETS zint EXPORT unofficial-zint-targets ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(EXPORT unofficial-zint-targets NAMESPACE unofficial::zint:: DESTINATION share/unofficial-zint)
if(ZINT_STATIC)
install(TARGETS zint-static ${INSTALL_TARGETS_DEFAULT_ARGS})
endif()

Просмотреть файл

@ -0,0 +1,13 @@
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt
index 854674d..c9d7627 100644
--- a/backend/CMakeLists.txt
+++ b/backend/CMakeLists.txt
@@ -4,8 +4,6 @@
project(zint)
-configure_file(zintconfig.h.in ${CMAKE_CURRENT_SOURCE_DIR}/zintconfig.h)
-
set(zint_COMMON_SRCS common.c library.c large.c reedsol.c gs1.c eci.c general_field.c)
set(zint_ONEDIM_SRCS bc412.c code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c)
set(zint_POSTAL_SRCS postal.c auspost.c imail.c mailmark.c)

44
ports/zint/portfile.cmake Normal file
Просмотреть файл

@ -0,0 +1,44 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zint/zint
REF 2.11.1
SHA512 21dbe5dc99b46f79ac1a819fd4e20de22bee8928da5f6b4883a0767243a8633c65f559ac60328dcd70b75a90438c0047c31c6ace1a10750a2579042f54aa801b
HEAD_REF master
PATCHES
0001-fix-static-lib.patch
0002-install-export.patch
0003-fix-parallel-configure.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
png ZINT_USE_PNG
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DZINT_USE_QT=OFF
-DZINT_TEST=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-zint)
vcpkg_copy_pdbs()
vcpkg_copy_tools(TOOL_NAMES zint AUTO_CLEAN)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/apps")
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/unofficial-zint-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/unofficial-zint/unofficial-zint-config.cmake"
@ONLY
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -0,0 +1,5 @@
if(@ZINT_USE_PNG@)
include(CMakeFindDependencyMacro)
find_dependency(PNG)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-zint-targets.cmake")

25
ports/zint/vcpkg.json Normal file
Просмотреть файл

@ -0,0 +1,25 @@
{
"name": "zint",
"version": "2.11.1",
"description": "A barcode encoding library supporting over 50 symbologies",
"homepage": "https://github.com/zint/zint",
"license": null,
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"png": {
"description": "Build with PNG support",
"dependencies": [
"libpng"
]
}
}
}

Просмотреть файл

@ -1157,6 +1157,7 @@ yara:arm-uwp=fail
yara:x64-uwp=fail
z3:arm-uwp=fail
z3:x64-uwp=fail
zint:x64-osx=fail
# clapack is replaced by lapack-reference on the platforms lapack-reference supports
clapack:x64-linux=skip

Просмотреть файл

@ -8256,6 +8256,10 @@
"baseline": "0.5.5",
"port-version": 3
},
"zint": {
"baseline": "2.11.1",
"port-version": 0
},
"zkpp": {
"baseline": "0.2.3",
"port-version": 2

9
versions/z-/zint.json Normal file
Просмотреть файл

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "4877dc23ac1534d68383a3297eb1c44560a4d1e5",
"version": "2.11.1",
"port-version": 0
}
]
}