Skip to content

Commit

Permalink
Develop (#51)
Browse files Browse the repository at this point in the history
* Fixes wasm (#47)

* Reduce js code

* Use the requestAnimationFrame

* Added a clear function to clear the source image

* option to not download openCV binaries (#49)

* added qr designs also one is free to use my designs or not

* use the latest Mydesigns
  • Loading branch information
EddyTheCo authored Nov 5, 2023
1 parent a0f2bff commit 767a4b7
Show file tree
Hide file tree
Showing 12 changed files with 249 additions and 227 deletions.
2 changes: 1 addition & 1 deletion Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
include(CMakeFindDependencyMacro)
find_dependency(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Svg OPTIONAL_COMPONENTS Multimedia )
find_dependency(OpenCV REQUIRED COMPONENTS core objdetect )
find_dependency(MyDesigns 0.3 REQUIRED CONFIG)
find_dependency(MyDesigns 0.4 REQUIRED CONFIG)
include ( "${CMAKE_CURRENT_LIST_DIR}/qrCodeTargets.cmake" )
4 changes: 3 additions & 1 deletion QrDec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
find_package(OpenCV COMPONENTS core objdetect imgproc flann features2d calib3d )
if(NOT OpenCV_FOUND )

option(OpenCV_DOWNLOAD "On or off" ON)
if(NOT OpenCV_FOUND AND OpenCV_DOWNLOAD)
set(builturl "https://github.com/EddyTheCo/install-OpenCV-action/releases/latest/download/OpenCV-ubuntu-latest-wasm_false-android_none.tar")
if(WIN32)
set(builturl "https://github.com/EddyTheCo/install-OpenCV-action/releases/latest/download/OpenCV-windows-latest-wasm_false-android_none.tar")
Expand Down
19 changes: 6 additions & 13 deletions QtQrDec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@

find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick OPTIONAL_COMPONENTS Multimedia)

FetchContent_Declare(
MyDesigns
GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git
GIT_TAG v0.3.1
FIND_PACKAGE_ARGS 0.3 CONFIG
GIT_TAG v0.4.1
FIND_PACKAGE_ARGS 0.4 CONFIG
)
FetchContent_MakeAvailable(MyDesigns)


if (Qt6_FOUND AND TARGET QrDec)
qt_standard_project_setup()
qt6_add_qml_module(QtQrDec
URI QtQrDec
VERSION 1.0
SOURCES Qrimagedecoder.cpp include/Qrimagedecoder.hpp
QML_FILES
qml/QrTextArea.qml
qml/QrQmlCamera.qml
qml/QrCam.qml
qml/QrTextCamPop.qml
RESOURCE_PREFIX
"/esterVtech.com/imports"
OUTPUT_TARGETS out_targets_var
Expand All @@ -29,14 +27,9 @@ if (Qt6_FOUND AND TARGET QrDec)
target_include_directories(QtQrDec PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/qrCode>")

target_link_libraries(QtQrDec PUBLIC Qt6::Gui Qt6::Quick QrDec)
target_link_libraries(QtQrDec PRIVATE MyDesigns
$<$<STREQUAL:$<TARGET_PROPERTY:MyDesigns,TYPE>,STATIC_LIBRARY>:MyDesignsplugin>
)
target_link_libraries(QtQrDec PUBLIC Qt6::Gui Qt6::Quick QrDec $<TARGET_NAME_IF_EXISTS:Qt6::Multimedia> MyDesigns
$<$<STREQUAL:$<TARGET_PROPERTY:MyDesigns,TYPE>,STATIC_LIBRARY>:MyDesignsplugin>)

if(TARGET Qt6::Multimedia)
target_link_libraries(QtQrDec PUBLIC Qt6::Multimedia)
endif(TARGET Qt6::Multimedia)
install(TARGETS QtQrDec QtQrDecplugin ${out_targets_var}
EXPORT qrCodeTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
Loading

0 comments on commit 767a4b7

Please sign in to comment.