move libarchive outside bundle libs

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2025-07-14 14:44:28 +03:00
parent d036bba341
commit 8cace06df9
4 changed files with 13 additions and 20 deletions

View File

@@ -349,29 +349,29 @@ else()
pkg_check_modules(libqrencode REQUIRED IMPORTED_TARGET libqrencode)
endif()
if(NOT Launcher_FORCE_BUNDLED_LIBS)
# Find libarchive through CMake packages, mainly for vcpkg
find_package(LibArchive QUIET)
# CMake packages aren't available in most distributions of libarchive, so fallback to pkg-config
if(NOT LibArchive_FOUND)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libarchive IMPORTED_TARGET libarchive)
pkg_check_modules(libarchive REQUIRED IMPORTED_TARGET libarchive)
endif()
if(NOT Launcher_FORCE_BUNDLED_LIBS)
# Find toml++
find_package(tomlplusplus 3.2.0 QUIET)
# Fallback to pkg-config (if available) if CMake files aren't found
if(NOT tomlplusplus_FOUND)
pkg_check_modules(tomlplusplus IMPORTED_TARGET tomlplusplus>=3.2.0)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(tomlplusplus IMPORTED_TARGET tomlplusplus>=3.2.0)
endif()
endif()
# Find cmark
find_package(cmark QUIET)
find_package(LibArchive 3.7.8 QUIET)
# Fallback to pkg-config (if available) if CMake files aren't found
if(NOT LibArchive_FOUND)
pkg_check_modules(LibArchive IMPORTED_TARGET LibArchive>=3.7.8)
endif()
# Find qrcodegencpp-cmake
find_package(qrcodegencpp QUIET)
endif()
include(ECMQtDeclareLoggingCategory)

View File

@@ -44,8 +44,6 @@
#include <QPixmap>
#include <QPixmapCache>
#include <optional>
#include "ModDetails.h"
#include "Resource.h"

View File

@@ -35,14 +35,10 @@
#pragma once
#include <memory>
#include <QString>
#include <QStringList>
#include <QUrl>
#include "minecraft/mod/MetadataHandler.h"
struct ModLicense {
QString name = {};
QString id = {};

View File

@@ -30,7 +30,6 @@
#include <memory>
#include "Application.h"
#include "Json.h"
#include "MMCZip.h"
#include "archive/ExportToZipTask.h"
#include "minecraft/PackProfile.h"
#include "minecraft/mod/ModFolderModel.h"