Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] nayuki/QR-Code-generator #2759

Closed
kirillkovalenko opened this issue Feb 9, 2018 · 4 comments · Fixed by #22615
Closed

[REQUEST] nayuki/QR-Code-generator #2759

kirillkovalenko opened this issue Feb 9, 2018 · 4 comments · Fixed by #22615
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:good-first-issue This issue would be a good issue to get one's feet wet in solving.

Comments

@kirillkovalenko
Copy link

Please add QR code generation library by naruki
https://github.com/nayuki/QR-Code-generator

@cmpute
Copy link
Contributor

cmpute commented Feb 11, 2018

Makefile may be hard to check in

@miurahr
Copy link
Contributor

miurahr commented Feb 13, 2018

Makefile may be hard to check in

There are two ways to handle the issue.

  1. Call nmake if project has makefile.vc

  2. Add CMakeLists.txt for the project

The project mentioned is simple enough to create CMakeLists.txt for C/C++ sources.

@cmpute You can find an example here and there
https://github.com/miurahr/vcpkg/blob/rasterlite2/ports/librasterlite2/add-cmakefiles.patch
https://github.com/Microsoft/vcpkg/blob/master/ports/uriparser/CMakeLists.txt

Fortunately QR-Code-generator is a simple Makefile project, that does not require configure.cmake/config.h.cmake.in trick.

@miurahr
Copy link
Contributor

miurahr commented Feb 15, 2018

How is this basic <project-root>/CMakeLists.txt?

cmake_minimum_required(VERSION 3.0)
project(QR-Code-generator C CXX)
option(BUILD_SHARED_LIBS "Set ON to build shared library" ON)
set(CSOURCES c/qrcodegen.c)
add_library(qrcodegen-c ${CSOURCES})
target_include_directories(qrcodegen-c PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/c)
set_target_properties(qrcodegen-c PROPERTIES   OUTPUT_NAME qrcodegen PREFIX "")
set(CPPSOURCES cpp/BitBuffer.cpp cpp/QrCode.cpp cpp/QrSegment.cpp)
add_library(qrcodegen-cpp ${CPPSOURCES})
target_include_directories(qrcodegen-cpp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cpp)
set_target_properties(qrcodegen-cpp PROPERTIES OUTPUT_NAME qrcodegen PREFIX "")
install(TARGETS qrcodegen-c  RUNTIME DESTINATION bin  ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
install(TARGETS qrcodegen-cpp RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)

It generates only libs, vcpkg ports can handle static/dynamic by -DBUILD_SHARED_LIBS=ON/OFF

@NancyLi1013 NancyLi1013 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Feb 14, 2019
@PhoebeHui PhoebeHui self-assigned this Oct 10, 2019
@PhoebeHui PhoebeHui removed their assignment Dec 3, 2019
@PhoebeHui PhoebeHui added the info:good-first-issue This issue would be a good issue to get one's feet wet in solving. label Dec 3, 2019
@JackBoosY
Copy link
Contributor

We can’t reopen this issue until a PR is opened, unfortunately, consider making a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:good-first-issue This issue would be a good issue to get one's feet wet in solving.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants