Skip to content

Commit

Permalink
[nayuki-qr-code-generator] new port (#22615)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Jan 19, 2022
1 parent 4d3628a commit be39f6a
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ports/nayuki-qr-code-generator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.14)

project(nayuki-qr-code-generator LANGUAGES CXX)

include(GNUInstallDirs)

add_library(nayuki-qr-code-generator qrcodegen.cpp)
target_compile_features(nayuki-qr-code-generator PUBLIC cxx_std_11)
target_include_directories(
nayuki-qr-code-generator
PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

install(FILES qrcodegen.hpp DESTINATION include)

install(TARGETS nayuki-qr-code-generator EXPORT unofficial-nayuki-qr-code-generator-config)

install(
EXPORT unofficial-nayuki-qr-code-generator-config
NAMESPACE unofficial::nayuki-qr-code-generator::
DESTINATION share/nayuki-qr-code-generator
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
24 changes: 24 additions & 0 deletions ports/nayuki-qr-code-generator/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nayuki/QR-Code-generator
REF v1.7.0
SHA512 34efa40c382b6e7d060a764936c4e2faa4fbbecd5ea4730492a2cb1960656ed67242d84e20a42400ffdee063ed6bcf3b860fef309d09ee71303f44abaafe9328
HEAD_REF master
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/cpp")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/cpp"
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

# Handle copyright
configure_file("${SOURCE_PATH}/Readme.markdown" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
16 changes: 16 additions & 0 deletions ports/nayuki-qr-code-generator/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "nayuki-qr-code-generator",
"version": "1.7.0",
"description": "High-quality QR Code generator library in C++",
"homepage": "https://github.com/nayuki/QR-Code-generator",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4676,6 +4676,10 @@
"baseline": "2019-08-28",
"port-version": 1
},
"nayuki-qr-code-generator": {
"baseline": "1.7.0",
"port-version": 0
},
"nccl": {
"baseline": "2.4.6",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/n-/nayuki-qr-code-generator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "9131848b9c36878cb0944b3e8058fa0d25b0d335",
"version": "1.7.0",
"port-version": 0
}
]
}

0 comments on commit be39f6a

Please sign in to comment.