From a565734e478aa5952cfb83db5c9fdfdc97979960 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 4 Dec 2024 15:06:04 -0500 Subject: [PATCH] themeeditor: Don't double-compile quazip, just use the same one as rbutil Change-Id: I470364c4184b3e176bc30d7957dd1c7703bb6046 --- utils/themeeditor/CMakeLists.txt | 26 ++++++++------------------ utils/themeeditor/quazip | 1 - utils/themeeditor/zlib | 1 - 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 120000 utils/themeeditor/quazip delete mode 120000 utils/themeeditor/zlib diff --git a/utils/themeeditor/CMakeLists.txt b/utils/themeeditor/CMakeLists.txt index 558d08822b..8d239b55f1 100644 --- a/utils/themeeditor/CMakeLists.txt +++ b/utils/themeeditor/CMakeLists.txt @@ -13,6 +13,13 @@ # KIND, either express or implied. # +find_package(QuaZip-Qt${QT_VERSION_MAJOR} QUIET) +if(QuaZip-Qt${QT_VERSION_MAJOR}_FOUND) + set(QUAZIP_LIBRARY QuaZip::QuaZip) +else() + set(QUAZIP_LIBRARY quazip) +endif() + add_executable(RockboxThemeEditor WIN32 MACOSX_BUNDLE graphics/rbalbumart.cpp graphics/rbalbumart.h @@ -103,23 +110,6 @@ add_executable(RockboxThemeEditor WIN32 MACOSX_BUNDLE qtfindreplacedialog/findreplaceform.ui qtfindreplacedialog/varianteditor.cpp qtfindreplacedialog/varianteditor.h - quazip/ioapi.h - quazip/qioapi.cpp - quazip/minizip_crypt.h - quazip/quazip.cpp - quazip/quazip.h - quazip/quazipfile.cpp - quazip/quazipfile.h - quazip/quazipfileinfo.h - quazip/quazipfileinfo.cpp - quazip/quazipnewinfo.cpp - quazip/quazipnewinfo.h - quazip/unzip.c - quazip/unzip.h - quazip/zip.c - quazip/zip.h - zlib/zconf.h - zlib/zlib.h resources.qrc themeeditor.rc ) @@ -129,7 +119,7 @@ set_target_properties(RockboxThemeEditor PROPERTIES AUTOUIC ON) target_link_libraries(RockboxThemeEditor Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Core - skin_parser z) + skin_parser z ${QUAZIP_LIBRARY}) target_include_directories(RockboxThemeEditor PRIVATE models graphics gui qtfindreplacedialog quazip) target_compile_definitions(RockboxThemeEditor PRIVATE FINDREPLACE_NOLIB) diff --git a/utils/themeeditor/quazip b/utils/themeeditor/quazip deleted file mode 120000 index 1176914bb1..0000000000 --- a/utils/themeeditor/quazip +++ /dev/null @@ -1 +0,0 @@ -../rbutilqt/quazip \ No newline at end of file diff --git a/utils/themeeditor/zlib b/utils/themeeditor/zlib deleted file mode 120000 index a71aebc2b4..0000000000 --- a/utils/themeeditor/zlib +++ /dev/null @@ -1 +0,0 @@ -../rbutilqt/zlib \ No newline at end of file