-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Align the URI of the modules * Create alias targets * Set private the singleton constructor * Added the examples * Improve readmes
- Loading branch information
Showing
45 changed files
with
1,325 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
add_library(QrGen src/qrcodegen.cpp src/utils.cpp) | ||
add_library(${PROJECT_NAME}::QrGen ALIAS QrGen) | ||
|
||
set_target_properties(QrGen PROPERTIES POSITION_INDEPENDENT_CODE ON) | ||
|
||
target_compile_features(QrGen PUBLIC cxx_std_11) | ||
|
||
target_include_directories(QrGen PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/qrCode>") | ||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/Esterv/${PROJECT_NAME}>") | ||
|
||
install(TARGETS QrGen | ||
EXPORT qrCodeTargets | ||
install(TARGETS QrGen | ||
EXPORT ${PROJECT_NAME}-config | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT Qr | ||
COMPONENT QrGen | ||
) | ||
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qrCode | ||
COMPONENT Qr | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv/${PROJECT_NAME} | ||
COMPONENT QrGen | ||
) | ||
|
||
if(BUILD_DOCS) | ||
get_target_property(build_docs cmake_build_docs SOURCES) | ||
include(${build_docs}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,89 @@ | ||
|
||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick OPTIONAL_COMPONENTS Multimedia) | ||
if(EMSCRIPTEN) | ||
find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools) | ||
else() | ||
find_package(Qt6 COMPONENTS Core Gui Qml Quick ShaderTools Multimedia) | ||
endif(EMSCRIPTEN) | ||
|
||
FetchContent_Declare( | ||
MyDesigns | ||
GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git | ||
GIT_TAG v0.4.1 | ||
FIND_PACKAGE_ARGS 0.4 CONFIG | ||
) | ||
FetchContent_MakeAvailable(MyDesigns) | ||
EstervDesigns | ||
GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git | ||
GIT_TAG v1.0.0 | ||
FIND_PACKAGE_ARGS 1.0 COMPONENTS SimpleStyle CustomControls CONFIG | ||
) | ||
FetchContent_MakeAvailable(EstervDesigns) | ||
|
||
|
||
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/QrQmlCamera.qml | ||
qml/QrCam.qml | ||
qml/QrTextCamPop.qml | ||
RESOURCE_PREFIX | ||
"/esterVtech.com/imports" | ||
OUTPUT_TARGETS out_targets_var | ||
OUTPUT_DIRECTORY | ||
${CMAKE_BINARY_DIR}/QtQrDec | ||
IMPORT_PATH ${CMAKE_BINARY_DIR} | ||
) | ||
|
||
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_NAME_IF_EXISTS:Qt6::Multimedia> MyDesigns | ||
$<$<STREQUAL:$<TARGET_PROPERTY:MyDesigns,TYPE>,STATIC_LIBRARY>:MyDesignsplugin>) | ||
|
||
install(TARGETS QtQrDec QtQrDecplugin ${out_targets_var} | ||
EXPORT qrCodeTargets | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT QtQr | ||
) | ||
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qrCode | ||
COMPONENT QtQr | ||
) | ||
install(DIRECTORY ${CMAKE_BINARY_DIR}/QtQrDec/ | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/QMLPlugins/QtQrDec | ||
COMPONENT QtQr | ||
) | ||
|
||
if(EMSCRIPTEN) | ||
target_compile_definitions(QtQrDec PRIVATE USE_EMSCRIPTEN) | ||
endif(EMSCRIPTEN) | ||
qt_standard_project_setup() | ||
qt6_add_qml_module(QtQrDec | ||
URI Esterv.CustomControls.QrDec | ||
VERSION 1.0 | ||
SOURCES Qrimagedecoder.cpp include/Qrimagedecoder.hpp | ||
QML_FILES | ||
"qml/QrCam.qml" | ||
"qml/QrDecPop.qml" | ||
"qml/QrTextField.qml" | ||
RESOURCE_PREFIX | ||
"/esterVtech.com/imports" | ||
OUTPUT_TARGETS out_targets_var | ||
OUTPUT_DIRECTORY | ||
${CMAKE_BINARY_DIR}/Esterv/CustomControls/QrDec | ||
IMPORT_PATH ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_LIBDIR} | ||
) | ||
|
||
add_library(${PROJECT_NAME}::QtQrDec ALIAS QtQrDec) | ||
add_library(${PROJECT_NAME}::QtQrDecplugin ALIAS QtQrDecplugin) | ||
|
||
|
||
qt6_add_shaders(QtQrDec "esterVtech.com.imports.QtQrDec.shaders" | ||
BATCHABLE | ||
PRECOMPILE | ||
OPTIMIZED | ||
OUTPUT_TARGETS out_targets_var2 | ||
PREFIX | ||
"/esterVtech.com/imports/Designs" | ||
FILES | ||
"frag/qrscanner.frag" | ||
) | ||
target_include_directories(QtQrDec PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/Esterv/${PROJECT_NAME}>") | ||
if(EMSCRIPTEN) | ||
target_compile_definitions(QtQrDec PRIVATE USE_EMSCRIPTEN) | ||
else() | ||
target_link_libraries(QtQrDec PUBLIC Qt6::Multimedia) | ||
endif(EMSCRIPTEN) | ||
target_link_libraries(QtQrDec PUBLIC Qt6::Gui Qt6::Quick QrDec Qt6::Multimedia | ||
EstervDesigns::SimpleStyle EstervDesigns::customControls | ||
$<$<STREQUAL:$<TARGET_PROPERTY:EstervDesigns::SimpleStyle,TYPE>,STATIC_LIBRARY>:EstervDesigns::SimpleStyleplugin> | ||
$<$<STREQUAL:$<TARGET_PROPERTY:EstervDesigns::customControls,TYPE>,STATIC_LIBRARY>:EstervDesigns::customControlsplugin>) | ||
|
||
install(TARGETS QtQrDec ${out_targets_var} ${out_targets_var2} | ||
EXPORT ${PROJECT_NAME}-config | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT QtQrDec | ||
) | ||
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv/${PROJECT_NAME} | ||
COMPONENT QtQrDec | ||
) | ||
install(DIRECTORY ${CMAKE_BINARY_DIR}/Esterv/CustomControls/QrDec | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/Esterv/CustomControls | ||
COMPONENT QtQrDec | ||
) | ||
|
||
install(TARGETS QtQrDecplugin | ||
EXPORT ${PROJECT_NAME}-config | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/Esterv/CustomControls/QrDec | ||
COMPONENT QtQrDec | ||
) | ||
|
||
if(EMSCRIPTEN) | ||
target_compile_definitions(QtQrDec PRIVATE USE_EMSCRIPTEN) | ||
endif(EMSCRIPTEN) | ||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | ||
add_subdirectory(examples) | ||
endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | ||
else(Qt6_FOUND AND TARGET QrDec) | ||
message(STATUS "The QML Module for QRCODE decoding will not be built") | ||
endif(Qt6_FOUND AND TARGET QrDec) |
Oops, something went wrong.