| 1 |
From: Boyuan Yang <[email protected]> |
| 2 |
Date: Tue, 11 Feb 2025 19:43:22 -0500 |
| 3 |
Subject: use system minizip lib |
| 4 |
|
| 5 |
--- |
| 6 |
application/CMakeLists.txt | 16 ++++------------ |
| 7 |
1 file changed, 4 insertions(+), 12 deletions(-) |
| 8 |
|
| 9 |
--- a/application/CMakeLists.txt |
| 10 |
+++ b/application/CMakeLists.txt |
| 11 |
@@ -104,6 +104,7 @@ |
| 12 |
pkg_check_modules(Gsetting REQUIRED gsettings-qt) |
| 13 |
endif() |
| 14 |
message(" >>> Build with DTK: ${DTK_VERSION_MAJOR}") |
| 15 |
+pkg_check_modules(MiniZip REQUIRED minizip) |
| 16 |
|
| 17 |
find_package(Qt${QT_DESIRED_VERSION} REQUIRED COMPONENTS ${qt_required_components}) |
| 18 |
find_package(Dtk${DTK_VERSION_MAJOR} COMPONENTS Core Gui Widget REQUIRED) |
| 19 |
@@ -242,15 +243,6 @@ |
| 20 |
file(GLOB LXW_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/libxlsxwriter/src/*.c) |
| 21 |
file(GLOB_RECURSE LXW_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/libxlsxwriter/include *.h) |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
file(GLOB TMPFILE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/tmpfileplus/*.c) |
| 33 |
file(GLOB MD5SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/md5/*.c) |
| 34 |
#--------------------------------------------- |
| 35 |
@@ -281,14 +273,14 @@ |
| 36 |
endforeach() |
| 37 |
#lupdate end |
| 38 |
|
| 39 |
|
| 40 |
+add_executable (${EXE_NAME} ${APP_CPP_FILES} ${APP_QRC_FILES} ${DOCX_CPP_FILES} ${LXW_SOURCES} ${DOCXFAC_SOURCES} ${DOCXFAC_SOURCES_C} ${TMPFILE_SOURCES} ${MD5SOURCES} ) |
| 41 |
include_sub_directories_recursively("${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/docx") |
| 42 |
include_sub_directories_recursively("${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/libxlsxwriter") |
| 43 |
include_sub_directories_recursively("${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/DocxFactory/include") |
| 44 |
include_sub_directories_recursively("${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/md5") |
| 45 |
|
| 46 |
include_sub_directories_recursively("${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/tmpfileplus") |
| 47 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) |
| 48 |
+include_directories( ${MiniZip_INCLUDE_DIRS}) |
| 49 |
include_directories( ${Boost_INCLUDE_DIRS}) |
| 50 |
include_directories( ${ZLIB_INCLUDE_DIRS}) |
| 51 |
message("ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}") |
| 52 |
@@ -306,7 +298,7 @@ |
| 53 |
|
| 54 |
#target_link_libraries(${EXE_NAME} ${CMAKE_BINARY_DIR}/3rdparty/libxlsxwriter/libxlsxwriter.a) |
| 55 |
|
| 56 |
|
| 57 |
+target_link_libraries(${EXE_NAME} ${MiniZip_LIBRARIES}) |
| 58 |
|
| 59 |
#target_link_libraries(${EXE_NAME} ${Zint_LIBRARIES}) |
| 60 |
#target_link_libraries(${EXE_NAME} ${RapidJSON_LIBRARIES}) |