From 5e7b64979fd88227a93ea3fb88df1c281f903a27 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 10 Jul 2021 15:48:10 +0200 Subject: [PATCH] fix Windows builds --- CMakeLists.txt | 9 +++------ Dockerfile.windows | 6 ++++-- src/CMakeLists.txt | 6 ++++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e87163..4f6e605d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,6 @@ option(WITH_SCANNER "Enable webcam QR scanner" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake") include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) -include(CheckLinkerFlag) include(FetchContent) include(FindCcache) include(CheckIncludeFile) @@ -103,11 +102,9 @@ set(HIDAPI_FOUND OFF) find_package(QREncode REQUIRED) # Qr scanner -if (WITH_SCANNER) - find_package(ZBAR REQUIRED) - message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}") - message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}") -endif() +find_package(ZBAR REQUIRED) +message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}") +message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}") # Tevador 14 word Monero seed find_package(monero-seed CONFIG) diff --git a/Dockerfile.windows b/Dockerfile.windows index a81b22e9..8ee99921 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -198,7 +198,8 @@ RUN git clone https://github.com/nih-at/libzip.git && \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32 && \ make -j$THREADS && \ - make -j$THREADS install + make -j$THREADS install && \ + rm -rf $(pwd) RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.git && \ cd zbar && \ @@ -206,4 +207,5 @@ RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.g autoreconf -vfi && \ ./configure --enable-static --disable-shared --without-imagemagick --disable-video --without-xv --with-gtk=no --with-python=no --enable-doc=no --host=x86_64-w64-mingw32 && \ make -j$THREADS && \ - make install \ No newline at end of file + make install && \ + rm -rf $(pwd) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c369d86..bb4e6aaa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,6 +57,8 @@ file(GLOB SOURCE_FILES "qrcode/*.cpp" "dialog/*.h" "dialog/*.cpp" + "qrcode_scanner/QrCodeUtils.cpp" + "qrcode_scanner/QrCodeUtils.h" ) if (WITH_SCANNER) @@ -141,11 +143,11 @@ target_include_directories(feather PUBLIC ${Qt5WebSockets_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${LIBZIP_INCLUDE_DIRS} + ${ZBAR_INCLUDE_DIR} ) if(WITH_SCANNER) target_include_directories(feather PUBLIC - ${ZBAR_INCLUDE_DIR} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5MultimediaWidgets_INCLUDE_DIRS} ) @@ -248,6 +250,7 @@ target_link_libraries(feather ${QRENCODE_LIBRARY} ${ZLIB_LIBRARIES} ${LIBZIP_LIBRARIES} + ${ZBAR_LIBRARIES} ) if(DEVICE_TREZOR_READY) @@ -258,7 +261,6 @@ if (WITH_SCANNER) target_link_libraries(feather Qt5::Multimedia Qt5::MultimediaWidgets - ${ZBAR_LIBRARIES} ) endif() -- 2.52.0