From 5f8cf96b963f14e20a01ff6f399ff8630e7704d2 Mon Sep 17 00:00:00 2001 From: Bartosz Pajewski Date: Wed, 18 Jul 2018 11:24:05 +0200 Subject: [PATCH 1/4] Create CMakeLists.txt RE: issue #57 https://github.com/ftylitak/qzxing/issues/57 Tested on: Qt 5.9.5 CMake 3.2 Win7 64bit --- src/CMakeLists.txt | 323 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..1caf293 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,323 @@ +cmake_minimum_required(VERSION 3.2) +project(QZXing) + +find_package(Qt5 REQUIRED Core) +find_package(Qt5 REQUIRED Network) +find_package(Qt5 REQUIRED Xml) +find_package(Qt5 REQUIRED Multimedia) +find_package(Qt5 REQUIRED MultimediaWidgets Widgets) +find_package(Qt5 REQUIRED Svg Quick QuickControls2) + +set(CMAKE_AUTOMOC ON) +#set(CMAKE_BUILD_TYPE Debug) +add_subdirectory(zxing) +add_library(qzxing STATIC + +# root + CameraImageWrapper.cpp + CameraImageWrapper.h + ImageHandler.cpp + ImageHandler.h + QZXing.cpp + QZXing.h + QZXingFilter.cpp + QZXingFilter.h + QZXingImageProvider.cpp + QZXingImageProvider.h + QZXing_global.h + +# zxing/bigint + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigInteger.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigInteger.cc + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerAlgorithms.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerAlgorithms.cc + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerLibrary.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerUtils.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerUtils.cc + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsigned.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsigned.cc + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsignedInABase.hh + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsignedInABase.cc + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/NumberlikeArray.hh + +# zxing/win32/zxing + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/iconv.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/win_iconv.c + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/msvc/stdint.h + +# zxing/zxing + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BarcodeFormat.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BarcodeFormat.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Binarizer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Binarizer.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BinaryBitmap.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BinaryBitmap.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ChecksumException.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ChecksumException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/DecodeHints.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/DecodeHints.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/EncodeHint.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/EncodeHint.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Exception.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Exception.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/FormatException.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/FormatException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/IllegalStateException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/InvertedLuminanceSource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/InvertedLuminanceSource.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/LuminanceSource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/LuminanceSource.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/MultiFormatReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/MultiFormatReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/NotFoundException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ReaderException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Result.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Result.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultIO.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPoint.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPoint.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPointCallback.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPointCallback.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/UnsupportedEncodingException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/WriterException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ZXing.h + +# zxing/zxing/aztec + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecDetectorResult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecDetectorResult.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/decoder/AztecDecoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/decoder/Decoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/detector/AztecDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/detector/Detector.h + +# zxing/zxing/common + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Array.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArray.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArray.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArrayIO.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitMatrix.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitMatrix.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitSource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitSource.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/CharacterSetECI.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/CharacterSetECI.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Counted.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DecoderResult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DecoderResult.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DetectorResult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DetectorResult.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GlobalHistogramBinarizer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GlobalHistogramBinarizer.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleLuminanceSource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleLuminanceSource.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GridSampler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GridSampler.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/HybridBinarizer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/HybridBinarizer.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/IllegalArgumentException.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/IllegalArgumentException.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/PerspectiveTransform.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/PerspectiveTransform.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Point.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Str.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Str.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/StringUtils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/StringUtils.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Types.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/JavaMath.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MathUtils.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MonochromeRectangleDetector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/WhiteRectangleDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/WhiteRectangleDetector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGF.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGF.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGFPoly.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonException.h + +# zxing/zxing/datamatrix + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixVersion.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/Version.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/BitMatrixParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataBlock.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/Decoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/CornerPoint.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/Detector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DetectorException.h + +# zxing/zxing/multi + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/ByQuadrantReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/ByQuadrantReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/GenericMultipleBarcodeReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/MultipleBarcodeReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/MultipleBarcodeReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/QRCodeMultiReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiDetector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h + +# zxing/zxing/oned + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/CodaBarReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/CodaBarReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code128Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code128Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code39Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code39Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code93Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code93Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN13Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN13Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN8Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN8Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/ITFReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/ITFReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatOneDReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatOneDReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatUPCEANReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatUPCEANReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDResultPoint.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDResultPoint.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCAReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCAReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEANReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEANReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEReader.h + +# zxing/zxing/pdf417 + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/PDF417Reader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/PDF417Reader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/BitMatrixParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/Decoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusGF.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/Detector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/LinesSampler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/LinesSampler.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/PDF417Detector.cpp + +# zxing/zxing/qrcode + + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/ErrorCorrectionLevel.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/FormatInformation.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRCodeReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRCodeReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRFormatInformation.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRVersion.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/Version.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/BitMatrixParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DataBlock.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DataMask.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/Decoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/Mode.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDataBlock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDataMask.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDecoder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRMode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/AlignmentPattern.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/Detector.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPattern.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPatternFinder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPatternInfo.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRDetector.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPattern.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/BlockPair.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/ByteMatrix.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/ByteMatrix.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/Encoder.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MaskUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MaskUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MatrixUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MatrixUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QRCode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QRCode.h + ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QREncoder.cpp + + ) + +target_link_libraries(qzxing + Qt5::Core + Qt5::Widgets + Qt5::Svg + Qt5::Quick + Qt5::QuickControls2 + Qt5::Multimedia + Qt5::MultimediaWidgets ) + +file(GLOB PUBLIC_HEADER QZXing.h) + +# Change Global Definitions depending on how you want to use the library +target_compile_definitions(qzxing + PRIVATE -QZXING_LIBRARY + PRIVATE -ZXING_ICONV_CONST + PUBLIC -QZXING_QML + PUBLIC -QZXING_MULTIMEDIA + PUBLIC DISABLE_LIBRARY_FEATURES) + +# Target includes +target_include_directories(qzxing + PUBLIC + . + QZXing.h + + PRIVATE + + zxing + zxing/win32/zxing + zxing/zxing +) + From 85945f9af6350d5be7e55db02673ff3115a3aa8d Mon Sep 17 00:00:00 2001 From: Bartosz Pajewski Date: Wed, 5 Jun 2019 21:06:22 +0200 Subject: [PATCH 2/4] Fixed --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1caf293..98fbb3f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,6 @@ find_package(Qt5 REQUIRED Svg Quick QuickControls2) set(CMAKE_AUTOMOC ON) #set(CMAKE_BUILD_TYPE Debug) -add_subdirectory(zxing) add_library(qzxing STATIC # root From 8eefa1d653d29729a8336fa8d09284e23b50bf2e Mon Sep 17 00:00:00 2001 From: Bartosz Pajewski Date: Mon, 22 Jul 2019 19:19:14 +0200 Subject: [PATCH 3/4] CMake update - update required cmake version - included sources by new style --- src/CMakeLists.txt | 344 +++++--------------------------- src/zxing/bigint/CMakeLists.txt | 19 ++ src/zxing/win32/CMakeLists.txt | 11 + src/zxing/zxing/CMakeLists.txt | 278 ++++++++++++++++++++++++++ 4 files changed, 356 insertions(+), 296 deletions(-) create mode 100644 src/zxing/bigint/CMakeLists.txt create mode 100644 src/zxing/win32/CMakeLists.txt create mode 100644 src/zxing/zxing/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 98fbb3f..9bf7e89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,322 +1,74 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.13) project(QZXing) -find_package(Qt5 REQUIRED Core) -find_package(Qt5 REQUIRED Network) -find_package(Qt5 REQUIRED Xml) -find_package(Qt5 REQUIRED Multimedia) -find_package(Qt5 REQUIRED MultimediaWidgets Widgets) +find_package(Qt5 COMPONENTS Core REQUIRED) +find_package(Qt5 COMPONENTS Gui REQUIRED) +find_package(Qt5 COMPONENTS Multimedia ) find_package(Qt5 REQUIRED Svg Quick QuickControls2) -set(CMAKE_AUTOMOC ON) -#set(CMAKE_BUILD_TYPE Debug) -add_library(qzxing STATIC +SET(BIGINT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint) +SET(WIN32_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing) +SET(ZXING_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing) + +set(CMAKE_AUTOMOC ON) + +set(SOURCES -# root CameraImageWrapper.cpp CameraImageWrapper.h ImageHandler.cpp ImageHandler.h QZXing.cpp QZXing.h - QZXingFilter.cpp - QZXingFilter.h - QZXingImageProvider.cpp - QZXingImageProvider.h QZXing_global.h - -# zxing/bigint - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigInteger.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigInteger.cc - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerAlgorithms.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerAlgorithms.cc - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerLibrary.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerUtils.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigIntegerUtils.cc - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsigned.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsigned.cc - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsignedInABase.hh - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/BigUnsignedInABase.cc - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/bigint/NumberlikeArray.hh - -# zxing/win32/zxing - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/iconv.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/win_iconv.c - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing/msvc/stdint.h - -# zxing/zxing - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BarcodeFormat.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BarcodeFormat.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Binarizer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Binarizer.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BinaryBitmap.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/BinaryBitmap.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ChecksumException.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ChecksumException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/DecodeHints.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/DecodeHints.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/EncodeHint.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/EncodeHint.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Exception.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Exception.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/FormatException.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/FormatException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/IllegalStateException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/InvertedLuminanceSource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/InvertedLuminanceSource.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/LuminanceSource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/LuminanceSource.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/MultiFormatReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/MultiFormatReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/NotFoundException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ReaderException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Result.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/Result.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultIO.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPoint.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPoint.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPointCallback.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ResultPointCallback.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/UnsupportedEncodingException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/WriterException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/ZXing.h - -# zxing/zxing/aztec - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecDetectorResult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecDetectorResult.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/AztecReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/decoder/AztecDecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/decoder/Decoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/detector/AztecDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/aztec/detector/Detector.h - -# zxing/zxing/common - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Array.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArray.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArray.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitArrayIO.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitMatrix.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitMatrix.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitSource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/BitSource.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/CharacterSetECI.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/CharacterSetECI.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Counted.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DecoderResult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DecoderResult.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DetectorResult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/DetectorResult.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GlobalHistogramBinarizer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GlobalHistogramBinarizer.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleLuminanceSource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleLuminanceSource.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleRotatedLuminanceSource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GreyscaleRotatedLuminanceSource.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GridSampler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/GridSampler.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/HybridBinarizer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/HybridBinarizer.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/IllegalArgumentException.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/IllegalArgumentException.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/PerspectiveTransform.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/PerspectiveTransform.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Point.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Str.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Str.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/StringUtils.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/StringUtils.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/Types.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/JavaMath.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MathUtils.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MonochromeRectangleDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/MonochromeRectangleDetector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/WhiteRectangleDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/detector/WhiteRectangleDetector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGF.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGF.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGFPoly.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/GenericGFPoly.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonDecoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonEncoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonException.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/common/reedsolomon/ReedSolomonException.h - -# zxing/zxing/datamatrix - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/DataMatrixVersion.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/Version.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/BitMatrixParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataBlock.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDataBlock.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DataMatrixDecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/DecodedBitStreamParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/decoder/Decoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/CornerPoint.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixCornerPoint.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DataMatrixDetectorException.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/Detector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/datamatrix/detector/DetectorException.h - -# zxing/zxing/multi - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/ByQuadrantReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/ByQuadrantReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/GenericMultipleBarcodeReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/GenericMultipleBarcodeReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/MultipleBarcodeReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/MultipleBarcodeReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/QRCodeMultiReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/QRCodeMultiReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiDetector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h - -# zxing/zxing/oned - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/CodaBarReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/CodaBarReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code128Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code128Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code39Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code39Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code93Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/Code93Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN13Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN13Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN8Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/EAN8Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/ITFReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/ITFReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatOneDReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatOneDReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatUPCEANReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/MultiFormatUPCEANReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDResultPoint.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/OneDResultPoint.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCAReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCAReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEANReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEANReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/oned/UPCEReader.h - -# zxing/zxing/pdf417 - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/PDF417Reader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/PDF417Reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/BitMatrixParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/DecodedBitStreamParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/Decoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417BitMatrixParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417DecodedBitStreamParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/PDF417Decoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ErrorCorrection.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusGF.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusGF.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusPoly.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/decoder/ec/ModulusPoly.h - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/Detector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/LinesSampler.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/LinesSampler.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/pdf417/detector/PDF417Detector.cpp - -# zxing/zxing/qrcode - - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/ErrorCorrectionLevel.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/FormatInformation.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRCodeReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRCodeReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRErrorCorrectionLevel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRFormatInformation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/QRVersion.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/Version.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/BitMatrixParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DataBlock.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DataMask.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/DecodedBitStreamParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/Decoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/Mode.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRBitMatrixParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDataBlock.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDataMask.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDecodedBitStreamParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRDecoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/decoder/QRMode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/AlignmentPattern.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/AlignmentPatternFinder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/Detector.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPattern.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPatternFinder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/FinderPatternInfo.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRAlignmentPattern.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRAlignmentPatternFinder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRDetector.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPattern.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/detector/QRFinderPatternInfo.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/BlockPair.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/ByteMatrix.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/ByteMatrix.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/Encoder.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MaskUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MaskUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MatrixUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/MatrixUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QRCode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QRCode.h - ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing/qrcode/encoder/QREncoder.cpp - ) -target_link_libraries(qzxing - Qt5::Core - Qt5::Widgets - Qt5::Svg - Qt5::Quick - Qt5::QuickControls2 - Qt5::Multimedia - Qt5::MultimediaWidgets ) +if(QZXING_MULTIMEDIA) + + LIST(APPEND SOURCES QZXingFilter.cpp QZXingFilter.h) + add_definitions(-DQZXING_MULTIMEDIA) + + SET(QZXING_USE_QML ON) + +endif(QZXING_MULTIMEDIA) + +if(QZXING_USE_QML) + LIST(APPEND SOURCES QZXingImageProvider.cpp QZXingImageProvider.h) + add_definitions(-DQZXING_QML) +endif(QZXING_USE_QML) + +add_library(qzxing "" ${SOURCES}) + +add_subdirectory(zxing/bigint) +add_subdirectory(zxing/win32) +add_subdirectory(zxing/zxing) + +target_link_libraries(qzxing Qt5::Core Qt5::Gui) + +if(QZXING_MULTIMEDIA) + target_link_libraries(qzxing Qt5::Multimedia) +endif(QZXING_MULTIMEDIA) + +if(QZXING_USE_QML) + target_link_libraries(qzxing + Qt5::Svg + Qt5::Quick + Qt5::QuickControls2) +endif(QZXING_USE_QML) -file(GLOB PUBLIC_HEADER QZXing.h) # Change Global Definitions depending on how you want to use the library -target_compile_definitions(qzxing - PRIVATE -QZXING_LIBRARY - PRIVATE -ZXING_ICONV_CONST - PUBLIC -QZXING_QML - PUBLIC -QZXING_MULTIMEDIA - PUBLIC DISABLE_LIBRARY_FEATURES) +target_compile_definitions(qzxing PUBLIC DISABLE_LIBRARY_FEATURES) # Target includes target_include_directories(qzxing - PUBLIC - . - QZXing.h - PRIVATE - + . zxing zxing/win32/zxing zxing/zxing + zxing/bigint + PUBLIC + $ ) diff --git a/src/zxing/bigint/CMakeLists.txt b/src/zxing/bigint/CMakeLists.txt new file mode 100644 index 0000000..376cfa2 --- /dev/null +++ b/src/zxing/bigint/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.13) + + +SET(SOURCES + BigInteger.hh + BigInteger.cc + BigIntegerAlgorithms.hh + BigIntegerAlgorithms.cc + BigIntegerLibrary.hh + BigIntegerUtils.hh + BigIntegerUtils.cc + BigUnsigned.hh + BigUnsigned.cc + BigUnsignedInABase.hh + BigUnsignedInABase.cc + NumberlikeArray.hh + ) + +target_sources(qzxing PRIVATE ${SOURCES}) diff --git a/src/zxing/win32/CMakeLists.txt b/src/zxing/win32/CMakeLists.txt new file mode 100644 index 0000000..48cacc2 --- /dev/null +++ b/src/zxing/win32/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.13) + +SET(SOURCES + + zxing/iconv.h + zxing/win_iconv.c + zxing/msvc/stdint.h + + ) + +target_sources(qzxing PRIVATE ${SOURCES}) diff --git a/src/zxing/zxing/CMakeLists.txt b/src/zxing/zxing/CMakeLists.txt new file mode 100644 index 0000000..90a4056 --- /dev/null +++ b/src/zxing/zxing/CMakeLists.txt @@ -0,0 +1,278 @@ +cmake_minimum_required(VERSION 3.13) + +SET(SOURCES + + BarcodeFormat.cpp + BarcodeFormat.h + Binarizer.cpp + Binarizer.h + BinaryBitmap.cpp + BinaryBitmap.h + ChecksumException.cpp + ChecksumException.h + DecodeHints.cpp + DecodeHints.h + EncodeHint.cpp + EncodeHint.h + Exception.cpp + Exception.h + FormatException.cpp + FormatException.h + IllegalStateException.h + InvertedLuminanceSource.cpp + InvertedLuminanceSource.h + LuminanceSource.cpp + LuminanceSource.h + MultiFormatReader.cpp + MultiFormatReader.h + NotFoundException.h + Reader.cpp + Reader.h + ReaderException.h + Result.cpp + Result.h + ResultIO.cpp + ResultPoint.cpp + ResultPoint.h + ResultPointCallback.cpp + ResultPointCallback.h + UnsupportedEncodingException.h + WriterException.h + ZXing.h + + ) + +SET(AZTEC_DIR + + aztec/AztecDetectorResult.cpp + aztec/AztecDetectorResult.h + aztec/AztecReader.cpp + aztec/AztecReader.h + aztec/decoder/AztecDecoder.cpp + aztec/decoder/Decoder.h + aztec/detector/AztecDetector.cpp + aztec/detector/Detector.h + + ) + +SET(COMMON_DIR + + common/Array.h + common/BitArray.cpp + common/BitArray.h + common/BitArrayIO.cpp + common/BitMatrix.cpp + common/BitMatrix.h + common/BitSource.cpp + common/BitSource.h + common/CharacterSetECI.cpp + common/CharacterSetECI.h + common/Counted.h + common/DecoderResult.cpp + common/DecoderResult.h + common/DetectorResult.cpp + common/DetectorResult.h + common/GlobalHistogramBinarizer.cpp + common/GlobalHistogramBinarizer.h + common/GreyscaleLuminanceSource.cpp + common/GreyscaleLuminanceSource.h + common/GreyscaleRotatedLuminanceSource.cpp + common/GreyscaleRotatedLuminanceSource.h + common/GridSampler.cpp + common/GridSampler.h + common/HybridBinarizer.cpp + common/HybridBinarizer.h + common/IllegalArgumentException.cpp + common/IllegalArgumentException.h + common/PerspectiveTransform.cpp + common/PerspectiveTransform.h + common/Point.h + common/Str.cpp + common/Str.h + common/StringUtils.cpp + common/StringUtils.h + common/Types.h + + common/detector/JavaMath.h + common/detector/MathUtils.h + common/detector/MonochromeRectangleDetector.cpp + common/detector/MonochromeRectangleDetector.h + common/detector/WhiteRectangleDetector.cpp + common/detector/WhiteRectangleDetector.h + + common/reedsolomon/GenericGF.cpp + common/reedsolomon/GenericGF.h + common/reedsolomon/GenericGFPoly.cpp + common/reedsolomon/GenericGFPoly.h + common/reedsolomon/ReedSolomonDecoder.cpp + common/reedsolomon/ReedSolomonDecoder.h + common/reedsolomon/ReedSolomonEncoder.cpp + common/reedsolomon/ReedSolomonEncoder.h + common/reedsolomon/ReedSolomonException.cpp + common/reedsolomon/ReedSolomonException.h + + ) + +SET(DATAMATRIX_DIR + + datamatrix/DataMatrixReader.cpp + datamatrix/DataMatrixReader.h + datamatrix/DataMatrixVersion.cpp + datamatrix/Version.h + + datamatrix/decoder/BitMatrixParser.h + datamatrix/decoder/DataBlock.h + datamatrix/decoder/DataMatrixBitMatrixParser.cpp + datamatrix/decoder/DataMatrixDataBlock.cpp + datamatrix/decoder/DataMatrixDecodedBitStreamParser.cpp + datamatrix/decoder/DataMatrixDecoder.cpp + datamatrix/decoder/DecodedBitStreamParser.h + datamatrix/decoder/Decoder.h + + datamatrix/detector/CornerPoint.h + datamatrix/detector/DataMatrixCornerPoint.cpp + datamatrix/detector/DataMatrixDetector.cpp + datamatrix/detector/DataMatrixDetectorException.cpp + datamatrix/detector/Detector.h + datamatrix/detector/DetectorException.h + + ) + +SET(MULTI_DIR + + multi/ByQuadrantReader.cpp + multi/ByQuadrantReader.h + multi/GenericMultipleBarcodeReader.cpp + multi/GenericMultipleBarcodeReader.h + multi/MultipleBarcodeReader.cpp + multi/MultipleBarcodeReader.h + + multi/qrcode/QRCodeMultiReader.cpp + multi/qrcode/QRCodeMultiReader.h + + multi/qrcode/detector/MultiDetector.cpp + multi/qrcode/detector/MultiDetector.h + multi/qrcode/detector/MultiFinderPatternFinder.cpp + multi/qrcode/detector/MultiFinderPatternFinder.h + + ) + +SET(ONED_DIR + + oned/CodaBarReader.cpp + oned/CodaBarReader.h + oned/Code128Reader.cpp + oned/Code128Reader.h + oned/Code39Reader.cpp + oned/Code39Reader.h + oned/Code93Reader.cpp + oned/Code93Reader.h + oned/EAN13Reader.cpp + oned/EAN13Reader.h + oned/EAN8Reader.cpp + oned/EAN8Reader.h + oned/ITFReader.cpp + oned/ITFReader.h + oned/MultiFormatOneDReader.cpp + oned/MultiFormatOneDReader.h + oned/MultiFormatUPCEANReader.cpp + oned/MultiFormatUPCEANReader.h + oned/OneDReader.cpp + oned/OneDReader.h + oned/OneDResultPoint.cpp + oned/OneDResultPoint.h + oned/UPCAReader.cpp + oned/UPCAReader.h + oned/UPCEANReader.cpp + oned/UPCEANReader.h + oned/UPCEReader.cpp + oned/UPCEReader.h + + ) + +SET(PDF417_DIR + + pdf417/PDF417Reader.cpp + pdf417/PDF417Reader.h + + pdf417/decoder/BitMatrixParser.h + pdf417/decoder/DecodedBitStreamParser.h + pdf417/decoder/Decoder.h + pdf417/decoder/PDF417BitMatrixParser.cpp + pdf417/decoder/PDF417DecodedBitStreamParser.cpp + pdf417/decoder/PDF417Decoder.cpp + + pdf417/decoder/ec/ErrorCorrection.cpp + pdf417/decoder/ec/ErrorCorrection.h + pdf417/decoder/ec/ModulusGF.cpp + pdf417/decoder/ec/ModulusGF.h + pdf417/decoder/ec/ModulusPoly.cpp + pdf417/decoder/ec/ModulusPoly.h + + pdf417/detector/Detector.h + pdf417/detector/LinesSampler.cpp + pdf417/detector/LinesSampler.h + pdf417/detector/PDF417Detector.cpp + + ) + +SET(QRCODE_DIR + + qrcode/ErrorCorrectionLevel.h + qrcode/FormatInformation.h + qrcode/QRCodeReader.cpp + qrcode/QRCodeReader.h + qrcode/QRErrorCorrectionLevel.cpp + qrcode/QRFormatInformation.cpp + qrcode/QRVersion.cpp + qrcode/Version.h + + qrcode/decoder/BitMatrixParser.h + qrcode/decoder/DataBlock.h + qrcode/decoder/DataMask.h + qrcode/decoder/DecodedBitStreamParser.h + qrcode/decoder/Decoder.h + qrcode/decoder/Mode.h + qrcode/decoder/QRBitMatrixParser.cpp + qrcode/decoder/QRDataBlock.cpp + qrcode/decoder/QRDataMask.cpp + qrcode/decoder/QRDecodedBitStreamParser.cpp + qrcode/decoder/QRDecoder.cpp + qrcode/decoder/QRMode.cpp + + qrcode/detector/AlignmentPattern.h + qrcode/detector/AlignmentPatternFinder.h + qrcode/detector/Detector.h + qrcode/detector/FinderPattern.h + qrcode/detector/FinderPatternFinder.h + qrcode/detector/FinderPatternInfo.h + qrcode/detector/QRAlignmentPattern.cpp + qrcode/detector/QRAlignmentPatternFinder.cpp + qrcode/detector/QRDetector.cpp + qrcode/detector/QRFinderPattern.cpp + qrcode/detector/QRFinderPatternFinder.cpp + qrcode/detector/QRFinderPatternInfo.cpp + + qrcode/encoder/BlockPair.h + qrcode/encoder/ByteMatrix.cpp + qrcode/encoder/ByteMatrix.h + qrcode/encoder/Encoder.h + qrcode/encoder/MaskUtil.cpp + qrcode/encoder/MaskUtil.h + qrcode/encoder/MatrixUtil.cpp + qrcode/encoder/MatrixUtil.h + qrcode/encoder/QRCode.cpp + qrcode/encoder/QRCode.h + qrcode/encoder/QREncoder.cpp + + ) + +target_sources(qzxing PRIVATE + ${SOURCES} + ${AZTEC_DIR} + ${COMMON_DIR} + ${DATAMATRIX_DIR} + ${MULTI_DIR} + ${ONED_DIR} + ${PDF417_DIR} + ${QRCODE_DIR}) From 19f4df96b3aceb45a0b075218dcb2e677ba5c68d Mon Sep 17 00:00:00 2001 From: Bartosz Pajewski Date: Sun, 15 Sep 2019 15:39:51 +0200 Subject: [PATCH 4/4] Win32 update Add defines used in WIN32 and MSVC --- src/CMakeLists.txt | 17 +++++++++++++++-- src/zxing/win32/CMakeLists.txt | 6 ++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9bf7e89..2c597a9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,6 +11,7 @@ SET(WIN32_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zxing/win32/zxing) SET(ZXING_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zxing/zxing) set(CMAKE_AUTOMOC ON) +set(CMAKE_WARN_ON) set(SOURCES @@ -39,8 +40,21 @@ endif(QZXING_USE_QML) add_library(qzxing "" ${SOURCES}) +if(WIN32) + add_subdirectory(zxing/win32) + if(MSVC) + add_definitions(-D__STDC_LIMIT_MACROS) + endif(MSVC) + + add_definitions(-DNO_ICONV) +endif(WIN32) + +if(VS_WINRT_COMPONENT) + add_definitions(-DNO_ICONV) +endif(VS_WINRT_COMPONENT) + add_subdirectory(zxing/bigint) -add_subdirectory(zxing/win32) + add_subdirectory(zxing/zxing) target_link_libraries(qzxing Qt5::Core Qt5::Gui) @@ -56,7 +70,6 @@ if(QZXING_USE_QML) Qt5::QuickControls2) endif(QZXING_USE_QML) - # Change Global Definitions depending on how you want to use the library target_compile_definitions(qzxing PUBLIC DISABLE_LIBRARY_FEATURES) diff --git a/src/zxing/win32/CMakeLists.txt b/src/zxing/win32/CMakeLists.txt index 48cacc2..b6b0a9e 100644 --- a/src/zxing/win32/CMakeLists.txt +++ b/src/zxing/win32/CMakeLists.txt @@ -4,8 +4,10 @@ SET(SOURCES zxing/iconv.h zxing/win_iconv.c - zxing/msvc/stdint.h +) - ) +if(MSVC) + LIST(APPEND SOURCES zxing/msvc/stdint.h) +endif(MSVC) target_sources(qzxing PRIVATE ${SOURCES})