Skip to content

Commit d3b3bf5

Browse files
committed
Refactoring
Added qmldir for android and removed option for ios
1 parent ec3b836 commit d3b3bf5

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

CMakeLists.txt

+14-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,26 @@
22

33

44
qt6_add_qml_module(ocvdecoder
5-
URI ocvdecoder.decoder
5+
URI ocvdecoder
66
VERSION 1.0
77
SOURCES
88
ocvdecoder.h ocvdecoder.cpp
99
)
1010

1111

12-
target_link_libraries(ocvdecoder
13-
PRIVATE Qt6::Quick Qt6::Multimedia
14-
-static-openmp -fopenmp
15-
)
12+
if (ANDROID)
13+
target_link_libraries(ocvdecoder
14+
PRIVATE Qt6::Quick Qt6::Multimedia
15+
-static-openmp -fopenmp
16+
)
17+
endif()
18+
19+
if (IOS)
20+
target_link_libraries(ocvdecoder
21+
PRIVATE Qt6::Quick Qt6::Multimedia
22+
)
23+
endif()
24+
1625

1726
target_include_directories(ocvdecoder PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/opencv/include/)
1827

qmldir

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module ocvdecoder
2+
linktarget ocvdecoderplugin
3+
optional plugin qml_ocvdecoder_ocvdecoderplugin
4+
classname ocvdecoderPlugin
5+
typeinfo ocvdecoder.qmltypes
6+
prefer :/ocvdecoder/

0 commit comments

Comments
 (0)