forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zint] Initial port (microsoft#27836)
- Loading branch information
Showing
9 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
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,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) |
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,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() |
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,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) |
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,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") |
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,5 @@ | ||
if(@ZINT_USE_PNG@) | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(PNG) | ||
endif() | ||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-zint-targets.cmake") |
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 @@ | ||
{ | ||
"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" | ||
] | ||
} | ||
} | ||
} |
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
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "4877dc23ac1534d68383a3297eb1c44560a4d1e5", | ||
"version": "2.11.1", | ||
"port-version": 0 | ||
} | ||
] | ||
} |