Skip to content

Commit

Permalink
Develop (#33)
Browse files Browse the repository at this point in the history
* Remove fetchcontent warning

* Do not download openCv on Android

* Do not build qt multimedia if qrdec does not exist
  • Loading branch information
EddyTheCo authored Sep 21, 2023
1 parent bc1a5bc commit 5166d23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion QrDec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
find_package(OpenCV)
if(NOT OpenCV_FOUND)
if(NOT OpenCV_FOUND AND NOT ANDROID)
set(builturl "https://github.com/EddyTheCo/install-OpenCV-action/releases/download/v0.0.14/OpenCV-ubuntu-latest-wasm_false.tar")
if(WIN32)
set(builturl "https://github.com/EddyTheCo/install-OpenCV-action/releases/download/v0.0.14/OpenCV-windows-latest-wasm_false.tar")
Expand All @@ -12,6 +12,7 @@ if(NOT OpenCV_FOUND)
endif(EMSCRIPTEN)
FetchContent_Declare(
OpenCV
DOWNLOAD_EXTRACT_TIMESTAMP true
URL ${builturl}
)
FetchContent_GetProperties(OpenCV)
Expand Down
8 changes: 3 additions & 5 deletions QtQrDec/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

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

if (Qt6_FOUND)


if (Qt6_FOUND AND TARGET QrDec)
qt_standard_project_setup()
if(NOT TARGET Qt6::Multimedia AND NOT EMSCRIPTEN)
FetchContent_Declare(
Expand All @@ -11,10 +13,6 @@ if (Qt6_FOUND)
)
FetchContent_MakeAvailable(qtmultimedia)
endif()
endif(Qt6_FOUND)


if (Qt6_FOUND AND TARGET QrDec)
list(APPEND qml_files "qml/QrTextArea.qml")
if(TARGET Qt6::Multimedia)
list(APPEND qml_files "qml/QrQmlCamera.qml")
Expand Down

0 comments on commit 5166d23

Please sign in to comment.