aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libdmtx
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libdmtx
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libdmtx')
-rw-r--r--vcpkg/ports/libdmtx/001-cmake-add-install-target.patch21
-rw-r--r--vcpkg/ports/libdmtx/portfile.cmake20
-rw-r--r--vcpkg/ports/libdmtx/vcpkg.json14
3 files changed, 55 insertions, 0 deletions
diff --git a/vcpkg/ports/libdmtx/001-cmake-add-install-target.patch b/vcpkg/ports/libdmtx/001-cmake-add-install-target.patch
new file mode 100644
index 0000000..0602d1b
--- /dev/null
+++ b/vcpkg/ports/libdmtx/001-cmake-add-install-target.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6420a813c1..749bd8d680 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.0)
++cmake_minimum_required(VERSION 3.5)
+ project(DMTX VERSION 0.7.5 LANGUAGES C)
+
+ # DMTX library
+@@ -26,3 +26,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+ add_subdirectory("test")
+ endif()
+ endif()
++
++# Add install rules
++install(TARGETS dmtx
++ RUNTIME DESTINATION bin
++ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib)
++install(FILES "dmtx.h" DESTINATION include)
diff --git a/vcpkg/ports/libdmtx/portfile.cmake b/vcpkg/ports/libdmtx/portfile.cmake
new file mode 100644
index 0000000..ce2711b
--- /dev/null
+++ b/vcpkg/ports/libdmtx/portfile.cmake
@@ -0,0 +1,20 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dmtx/libdmtx
+ REF v${VERSION}
+ SHA512 802a697669afeb74da0cc3736fe7301fcc1653c1e3bebc343a8baf76e52226cc5509231519343267a92e22ebdfcc5b2825380339991340f054f0a6685d2ffcdc
+ PATCHES
+ 001-cmake-add-install-target.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/libdmtx/vcpkg.json b/vcpkg/ports/libdmtx/vcpkg.json
new file mode 100644
index 0000000..3f2e793
--- /dev/null
+++ b/vcpkg/ports/libdmtx/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "libdmtx",
+ "version": "0.7.7",
+ "port-version": 1,
+ "description": "Software library that enables programs to read and write Data Matrix barcodes of the modern ECC200 variety",
+ "homepage": "https://github.com/dmtx/libdmtx",
+ "license": "BSD-2-Clause",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}