diff --git a/CMakeLists.txt b/CMakeLists.txt index 605030e..c3fa486 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) include(GNUInstallDirs) + if(BUILD_QRDEC) add_subdirectory(QrDec) endif(BUILD_QRDEC) diff --git a/QrDec/CMakeLists.txt b/QrDec/CMakeLists.txt index 2c02e87..061ab77 100755 --- a/QrDec/CMakeLists.txt +++ b/QrDec/CMakeLists.txt @@ -37,7 +37,8 @@ if(NOT OpenCV_FOUND AND OpenCV_DOWNLOAD) if(OpenCV_FOUND AND NOT ANDROID AND NOT EMSCRIPTEN) install(IMPORTED_RUNTIME_ARTIFACTS ${OpenCV_LIBS} DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT QrDec + COMPONENT OpenCVDep + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT OpenCVDep ) endif() endif() @@ -58,6 +59,7 @@ if(OpenCV_FOUND) EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT QrDec + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QrDec ) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv diff --git a/QrGen/CMakeLists.txt b/QrGen/CMakeLists.txt index 3bfadff..172c5bb 100755 --- a/QrGen/CMakeLists.txt +++ b/QrGen/CMakeLists.txt @@ -12,6 +12,7 @@ install(TARGETS QrGen EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT QrGen + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QrGen ) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv diff --git a/QtQrDec/CMakeLists.txt b/QtQrDec/CMakeLists.txt index 553116d..64d6397 100644 --- a/QtQrDec/CMakeLists.txt +++ b/QtQrDec/CMakeLists.txt @@ -1,8 +1,8 @@ if(EMSCRIPTEN) - find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools) + find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools) else() - find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools Multimedia) + find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools Multimedia) endif(EMSCRIPTEN) @@ -11,7 +11,7 @@ if (Qt6_FOUND AND TARGET QrDec) FetchContent_Declare( EstervDesigns GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git - GIT_TAG v1.2.0 + GIT_TAG develop FIND_PACKAGE_ARGS 1.2 COMPONENTS SimpleStyle CustomControls CONFIG ) FetchContent_MakeAvailable(EstervDesigns) @@ -29,7 +29,7 @@ if (Qt6_FOUND AND TARGET QrDec) OUTPUT_TARGETS out_targets_var OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Esterv/CustomControls/QrDec - IMPORT_PATH ${CMAKE_BINARY_DIR} + IMPORT_PATH ${CMAKE_BINARY_DIR} ) add_library(${PROJECT_NAME}::QtQrDec ALIAS QtQrDec) @@ -63,6 +63,7 @@ if (Qt6_FOUND AND TARGET QrDec) EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT QtQrDec + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QtQrDec ) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv @@ -77,6 +78,7 @@ if (Qt6_FOUND AND TARGET QrDec) EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/Esterv/CustomControls/QrDec COMPONENT QtQrDec + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QtQrDec ) if(EMSCRIPTEN) diff --git a/QtQrDec/Qrimagedecoder.cpp b/QtQrDec/Qrimagedecoder.cpp index e514591..3efcfb4 100644 --- a/QtQrDec/Qrimagedecoder.cpp +++ b/QtQrDec/Qrimagedecoder.cpp @@ -89,16 +89,6 @@ void QRImageDecoder::getCamera(void) } } m_camera=new QCamera(best,this); - auto bvF=best.videoFormats().at(0); - for (const QCameraFormat &format : best.videoFormats()) - { - if(abs(format.resolution().width()*1.0-format.resolution().height())setCameraFormat(bvF); - } } diff --git a/QtQrDec/examples/CMakeLists.txt b/QtQrDec/examples/CMakeLists.txt index 927ef93..69e0a21 100644 --- a/QtQrDec/examples/CMakeLists.txt +++ b/QtQrDec/examples/CMakeLists.txt @@ -1,4 +1,5 @@ if(BUILD_EXAMPLES) + include(InstallRequiredSystemLibraries) if(EMSCRIPTEN OR ANDROID) find_package(Qt6 REQUIRED COMPONENTS QuickControls2) find_package(EstervDesigns 0.4 REQUIRED COMPONENTS FlatControl CONFIG ) @@ -20,7 +21,7 @@ if(BUILD_EXAMPLES) if(NOT EMSCRIPTEN) target_link_libraries(${example} PRIVATE Qt6::Multimedia) endif(NOT EMSCRIPTEN) - target_link_libraries(${example} PRIVATE Qt::Gui Qt::Qml Qt::Quick $ QtQrDec + target_link_libraries(${example} PRIVATE Qt::Gui Qt::Qml Qt::Quick QtQrDec $<$,STATIC_LIBRARY>:QtQrDecplugin> ) @@ -37,6 +38,7 @@ if(BUILD_EXAMPLES) qt_generate_deploy_qml_app_script( TARGET ${example} OUTPUT_SCRIPT deploy_script + # DEPLOY_TOOL_OPTIONS -multimedia #Qt> 6.7.0 only for windows ) install(SCRIPT ${deploy_script} COMPONENT examples) endif(QTDEPLOY) diff --git a/QtQrGen/CMakeLists.txt b/QtQrGen/CMakeLists.txt index bbc88e2..5ccbc2e 100644 --- a/QtQrGen/CMakeLists.txt +++ b/QtQrGen/CMakeLists.txt @@ -4,7 +4,7 @@ if (Qt6_FOUND AND TARGET QrGen) FetchContent_Declare( EstervDesigns GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git - GIT_TAG v1.2.0 + GIT_TAG develop FIND_PACKAGE_ARGS 1.2 COMPONENTS SimpleStyle CustomControls CONFIG ) FetchContent_MakeAvailable(EstervDesigns) @@ -65,6 +65,7 @@ if (Qt6_FOUND AND TARGET QrGen) EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT QtQrGen + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QtQrGen ) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv @@ -79,6 +80,7 @@ if (Qt6_FOUND AND TARGET QrGen) EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/Esterv/CustomControls/QrGen COMPONENT QtQrGen + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT QtQrGen ) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) add_subdirectory(examples) diff --git a/QtQrGen/examples/CMakeLists.txt b/QtQrGen/examples/CMakeLists.txt index 14ce0ba..8f63ed2 100644 --- a/QtQrGen/examples/CMakeLists.txt +++ b/QtQrGen/examples/CMakeLists.txt @@ -1,4 +1,5 @@ if(BUILD_EXAMPLES) + include(InstallRequiredSystemLibraries) if(EMSCRIPTEN OR ANDROID) find_package(Qt6 REQUIRED COMPONENTS QuickControls2) find_package(EstervDesigns 0.4 REQUIRED COMPONENTS FlatControl CONFIG )