forked from fritzing/fritzing-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite quazip detect to exactly match qt version
- Loading branch information
1 parent
86db727
commit af2c566
Showing
2 changed files
with
18 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,29 @@ | ||
# Copyright (c) 2021 Fritzing GmbH | ||
# Copyright (c) 2021,2023 Fritzing GmbH | ||
|
||
message("Using fritzing quazip detect script.") | ||
message("Using Fritzing quazip detect script.") | ||
|
||
QUAZIP_VERSION=1.4 | ||
QUAZIP_PATH=$$absolute_path($$PWD/../../quazip-$$QT_VERSION-$$QUAZIP_VERSION) | ||
QUAZIP_INCLUDE_PATH=$$QUAZIP_PATH/include/QuaZip-Qt6-$$QUAZIP_VERSION | ||
QUAZIP_LIB_PATH=$$QUAZIP_PATH/lib | ||
|
||
SOURCES += \ | ||
src/zlibdummy.c \ | ||
src/zlibdummy.c \ | ||
|
||
!macx { | ||
exists($$absolute_path($$PWD/../../quazip_qt$$QT_MAJOR_VERSION)) { | ||
QUAZIPPATH = $$absolute_path($$PWD/../../quazip_qt$$QT_MAJOR_VERSION) | ||
message("found quazip in $${QUAZIPPATH}") | ||
exists($$QUAZIP_PATH) { | ||
message("found quazip in $${QUAZIP_PATH}") | ||
} else { | ||
error("quazip could not be found.") | ||
error("quazip could not be found at $$QUAZIP_PATH") | ||
} | ||
|
||
message("including $$absolute_path($${QUAZIPPATH}/include/quazip)") | ||
} | ||
INCLUDEPATH += $$QUAZIP_INCLUDE_PATH | ||
LIBS += -L$$QUAZIP_LIB_PATH -lquazip1-qt$$QT_MAJOR_VERSION | ||
|
||
unix:!macx { | ||
message("including quazip library on linux") | ||
INCLUDEPATH += $$absolute_path($${QUAZIPPATH}/include/quazip) | ||
LIBS += -L$$absolute_path($${QUAZIPPATH}/lib) -lquazip1-qt$$QT_MAJOR_VERSION | ||
QMAKE_RPATHDIR += $$absolute_path($${QUAZIPPATH}/lib) | ||
unix { | ||
message("set rpath for quazip") | ||
QMAKE_RPATHDIR += $$QUAZIP_LIB_PATH | ||
} | ||
|
||
macx { | ||
QUAZIP_VERSION=1.4 | ||
QUAZIP_PATH=$$absolute_path($$PWD/../../quazip-$$QT_VERSION-$$QUAZIP_VERSION) | ||
QUAZIP_INCLUDE_PATH=$$QUAZIP_PATH/include/QuaZip-Qt6-$$QUAZIP_VERSION/quazip | ||
QUAZIP_LIB_PATH=$$QUAZIP_PATH/lib | ||
|
||
message("including quazip library on mac os") | ||
INCLUDEPATH += $$QUAZIP_INCLUDE_PATH | ||
LIBS += -L$$QUAZIP_LIB_PATH -lquazip1-qt$$QT_MAJOR_VERSION | ||
QMAKE_RPATHDIR += $$QUAZIP_LIB_PATH | ||
LIBS += -lz | ||
} | ||
|
||
win32 { | ||
|
||
message("including quazip library on windows") | ||
|
||
QUAZIPINCLUDE = $$absolute_path($${QUAZIPPATH}/include/quazip) | ||
exists($$QUAZIPINCLUDE/quazip.h) { | ||
message("found quazip include path at $$QUAZIPINCLUDE") | ||
} else { | ||
message("Fritzing requires quazip") | ||
error("quazip include path not found in $$QUAZIPINCLUDE") | ||
} | ||
|
||
INCLUDEPATH += $$QUAZIPINCLUDE | ||
|
||
contains(QMAKE_TARGET.arch, x86_64) { | ||
QUAZIPLIB = $$absolute_path($$QUAZIPPATH/build64/Release) | ||
} else { | ||
QUAZIPLIB = $$absolute_path($$QUAZIPPATH/build32/Release) | ||
} | ||
|
||
exists($$QUAZIPLIB/quazip1-qt*) { | ||
message("found quazip library in $$QUAZIPLIB") | ||
} else { | ||
error("quazip library not found in $$QUAZIPLIB") | ||
} | ||
|
||
LIBS += -L$$QUAZIPLIB -lquazip1-qt$$QT_MAJOR_VERSION | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters