Browse Source

fix Windows builds

beta-8-fixes-2
tobtoht 7 months ago
parent
commit
5e7b64979f
Signed by: tobtoht GPG Key ID: 1CADD27F41F45C3C
  1. 9
      CMakeLists.txt
  2. 6
      Dockerfile.windows
  3. 6
      src/CMakeLists.txt

9
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)

6
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
make install && \
rm -rf $(pwd)

6
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()

Loading…
Cancel
Save