Skip to content

Commit 904dca4

Browse files
committed
Work on the build system
1 parent a80d653 commit 904dca4

3 files changed

Lines changed: 22 additions & 23 deletions

File tree

CMakeLists.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set(APP_VERSION ${CMAKE_PROJECT_VERSION})
1313

1414
option(USE_QZXING "Build with QZXing support (decoder&encoder)" OFF)
1515
option(USE_ZXINGCPP "Build with zxing-cpp support (decoder&encoder)" ON)
16-
option(USE_ZINT "Build with zint support (encoder)" OFF)
16+
option(USE_ZINT "Build with zint support (encoder)" ON)
1717

1818
################################################################################
1919

@@ -62,12 +62,10 @@ set(SOURCES
6262
if(IOS OR ANDROID) # Mobile
6363

6464
set(QAPPLICATION_CLASS QGuiApplication)
65-
set(USE_ZINT OFF)
6665

6766
else() # Desktop
6867

6968
set(QAPPLICATION_CLASS QApplication)
70-
set(USE_ZINT ON)
7169

7270
# Set app icons
7371
#if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
@@ -136,8 +134,9 @@ function(add_other_files target)
136134
endfunction()
137135

138136
add_other_files(${CMAKE_PROJECT_NAME}
139-
README.md TODO.md LICENSE.md .gitignore
137+
README.md LICENSE.md TODO.md
140138
.github/workflows/builds_mobile.yml
139+
.gitignore
141140
)
142141

143142
################################################################################
@@ -182,7 +181,7 @@ if(USE_ZINT)
182181
add_subdirectory(thirdparty/zint-qml)
183182
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE zint)
184183

185-
# build ZintQml
184+
# build ZintQml wrapper
186185
add_subdirectory(thirdparty/zint-qml/wrappers/qml)
187186
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ZintQml)
188187
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE QMS_USE_ZINT)
@@ -276,17 +275,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
276275
# Support 16 KB page sizes / pre NDK28
277276
target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,max-page-size=16384")
278277

279-
# Download SSL Libraries
280-
include(FetchContent)
281-
FetchContent_Declare(
282-
android_openssl
283-
DOWNLOAD_EXTRACT_TIMESTAMP true
284-
URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
285-
)
286-
FetchContent_MakeAvailable(android_openssl)
287-
include(${android_openssl_SOURCE_DIR}/android_openssl.cmake)
288-
# Include SSL Libraries
289-
add_android_openssl_libraries(${CMAKE_PROJECT_NAME})
278+
## Download SSL Libraries
279+
#include(FetchContent)
280+
#FetchContent_Declare(
281+
# android_openssl
282+
# DOWNLOAD_EXTRACT_TIMESTAMP true
283+
# URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
284+
#)
285+
#FetchContent_MakeAvailable(android_openssl)
286+
#include(${android_openssl_SOURCE_DIR}/android_openssl.cmake)
287+
## Include SSL Libraries
288+
#add_android_openssl_libraries(${CMAKE_PROJECT_NAME})
290289
endif()
291290

292291
## iOS

thirdparty/zint-qml/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ option(ZINT_SANITIZEM "Set sanitize memory (ignored if ZINT_SANITIZE)" OFF)
2222
option(ZINT_TEST "Set test compile flag" OFF)
2323
option(ZINT_COVERAGE "Set code coverage flags" OFF)
2424
option(ZINT_SHARED "Build shared library" ON)
25-
option(ZINT_STATIC "Build static library" OFF)
25+
option(ZINT_STATIC "Build static library" ON)
2626
option(ZINT_FRONTEND "Build frontend" OFF)
2727
option(ZINT_USE_GS1SE "Build with GS1 Syntax Engine" OFF)
2828
option(ZINT_USE_PNG "Build with PNG support" OFF)

thirdparty/zint-qml/wrappers/qml/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ set(SOURCES
44
ZintImageProvider.cpp ZintImageProvider.h
55
)
66

7-
add_library (ZintQml ${SOURCES})
7+
add_library(ZintQml ${SOURCES})
88

9-
#target_link_libraries (ZintQml PRIVATE zint-package::zint)
10-
#target_include_directories (ZintQml PRIVATE zint-package::zint)
9+
target_link_libraries(ZintQml PRIVATE zint)
10+
target_include_directories(ZintQml PRIVATE zint)
1111

12-
find_package (Qt6 REQUIRED COMPONENTS Core Quick)
13-
target_link_libraries (ZintQml PRIVATE Qt6::Core Qt6::Quick)
12+
find_package(Qt6 REQUIRED COMPONENTS Core Quick)
13+
target_link_libraries(ZintQml PRIVATE Qt6::Core Qt6::Quick)
1414

15-
target_include_directories (ZintQml PUBLIC ${CMAKE_CURRENT_LIST_DIR})
15+
target_include_directories(ZintQml PUBLIC ${CMAKE_CURRENT_LIST_DIR})

0 commit comments

Comments
 (0)