1
0
Fork 0

Find and use packaged version of qr-code-generator library.

Disabled by default until upstream will merge proposed PR.

Can be enabled by forwarding `-DDESKTOP_APP_USE_PACKAGED_QRCODE:BOOL=ON`
cmake build option.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
Vitaly Zaitsev 2020-02-07 18:10:48 +01:00 committed by John Preston
parent 2793a8d3be
commit 808982a65e
2 changed files with 30 additions and 18 deletions

View file

@ -4,6 +4,16 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (DESKTOP_APP_USE_PACKAGED_QRCODE)
add_library(external_qr_code_generator INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_qr_code_generator ALIAS external_qr_code_generator)
find_library(QRCODE_LIBRARY NAMES "qrcodegencpp")
find_path(QRCODE_INCLUDE_DIRS "qrcodegencpp/QrCode.hpp")
target_include_directories(external_qr_code_generator INTERFACE ${QRCODE_INCLUDE_DIRS})
target_link_libraries(external_qr_code_generator INTERFACE ${QRCODE_LIBRARY})
else()
add_library(external_qr_code_generator OBJECT)
add_library(desktop-app::external_qr_code_generator ALIAS external_qr_code_generator)
init_target(external_qr_code_generator "(external)")
@ -25,3 +35,4 @@ target_include_directories(external_qr_code_generator
PUBLIC
${qr_src}
)
endif()

View file

@ -26,6 +26,7 @@ option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bun
option(DESKTOP_APP_USE_PACKAGED_EXPECTED "Find expected using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED})
option(DESKTOP_APP_USE_PACKAGED_VARIANT "Find mapbox-variant using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED})
option(DESKTOP_APP_USE_PACKAGED_GSL "Find GSL using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED})
option(DESKTOP_APP_USE_PACKAGED_QRCODE "Find qr-code-generator library using CMake instead of bundled one." OFF)
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled one." ${DESKTOP_APP_USE_PACKAGED})
option(DESKTOP_APP_ENABLE_IPO_OPTIMIZATIONS "Enable IPO build optimizations." OFF)