Skip to content

Commit e2d5c38

Browse files
committed
build: Use system includes if QuaZip is found
1 parent 43d27d4 commit e2d5c38

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,12 @@ ELSE (WORKBENCH_USE_QT6)
514514
SET(QUAZIP_RESULT "${QuaZip-Qt5_VERSION} ${QuaZip-Qt5_DIR}")
515515
ENDIF (QuaZip-Qt5_FOUND)
516516
ENDIF (WORKBENCH_USE_QT6)
517-
IF (NOT QUAZIP_FOUND)
517+
518+
IF (QUAZIP_FOUND)
519+
INCLUDE_DIRECTORIES(QuaZip::QuaZip)
520+
LINK_LIBRARIES(QuaZip::QuaZip)
521+
ADD_DEFINITIONS(-DHAVE_QUAZIP)
522+
ELSE (QUAZIP_FOUND)
518523
#
519524
# Quazip needs this defined here for static linking on windows
520525
#
@@ -524,7 +529,7 @@ IF (NOT QUAZIP_FOUND)
524529
ENDIF(MSVC)
525530
ENDIF(WIN32)
526531
SET(QUAZIP_RESULT "In Workbench Source Code")
527-
ENDIF (NOT QUAZIP_FOUND)
532+
ENDIF (QUAZIP_FOUND)
528533

529534
##########################################################################################
530535
#

src/Operations/OperationZipSceneFile.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@
3434
#include "ScenePathName.h"
3535
#include "SpecFile.h"
3636

37+
#ifdef HAVE_QUAZIP
38+
#include <quazip5/quazip.h>
39+
#include <quazip5/quazipfile.h>
40+
#else
3741
#include "quazip.h"
3842
#include "quazipfile.h"
43+
#endif // HAVE_QUAZIP
3944

4045
#include <QDir>
4146

src/Operations/OperationZipSpecFile.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
#include "OperationException.h"
2727
#include "SpecFile.h"
2828

29+
#ifdef HAVE_QUAZIP
30+
#include <quazip5/quazip.h>
31+
#include <quazip5/quazipfile.h>
32+
#else
2933
#include "quazip.h"
3034
#include "quazipfile.h"
35+
#endif // HAVE_QUAZIP
3136

3237
//for cleanPath
3338
#include <QDir>

0 commit comments

Comments
 (0)