aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/nu-book-zxing-cpp/portfile.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/nu-book-zxing-cpp/portfile.cmake')
-rw-r--r--vcpkg/ports/nu-book-zxing-cpp/portfile.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/vcpkg/ports/nu-book-zxing-cpp/portfile.cmake b/vcpkg/ports/nu-book-zxing-cpp/portfile.cmake
new file mode 100644
index 0000000..5cc46fc
--- /dev/null
+++ b/vcpkg/ports/nu-book-zxing-cpp/portfile.cmake
@@ -0,0 +1,33 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO zxing-cpp/zxing-cpp
+ REF "v${VERSION}"
+ SHA512 be1c60a6b433c18f8dab56619553023370bfd3eddf49b0e16548466e1ebc2f1f37b48e0b36c2e74296a7274c4f0117d7052f1ffd7d1223d23e493451a11b4a80
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_fixup_pkgconfig()
+
+vcpkg_cmake_config_fixup(
+ CONFIG_PATH lib/cmake/ZXing
+ PACKAGE_NAME ZXing
+)
+
+file(READ "${CURRENT_PACKAGES_DIR}/share/ZXing/ZXingConfig.cmake" _contents)
+file(WRITE "${CURRENT_PACKAGES_DIR}/share/ZXing/ZXingConfig.cmake" "
+include(CMakeFindDependencyMacro)
+find_dependency(Threads)
+${_contents}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")