mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 03:37:47 +00:00
Fix the last of the system libraries issue
This commit is contained in:
parent
0a34dd676e
commit
2c8e0f1552
5 changed files with 50 additions and 6 deletions
|
@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD 17)
|
||||||
find_package(Qt5 COMPONENTS Core Widgets Network CONFIG REQUIRED)
|
find_package(Qt5 COMPONENTS Core Widgets Network CONFIG REQUIRED)
|
||||||
|
|
||||||
option(ENABLE_WATCHDOG "Build with Tesseract support (needed for Watchdog)" OFF)
|
option(ENABLE_WATCHDOG "Build with Tesseract support (needed for Watchdog)" OFF)
|
||||||
|
option(USE_OWN_LIBRARIES "Build with own libraries" OFF)
|
||||||
|
|
||||||
if(ENABLE_WATCHDOG)
|
if(ENABLE_WATCHDOG)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
@ -33,24 +34,63 @@ set(SRC
|
||||||
src/gamescopesettingswindow.cpp
|
src/gamescopesettingswindow.cpp
|
||||||
include/gamescopesettingswindow.h)
|
include/gamescopesettingswindow.h)
|
||||||
|
|
||||||
find_package(Qt5Keychain)
|
include(FetchContent)
|
||||||
|
|
||||||
|
if(NOT USE_OWN_LIBRARIES)
|
||||||
|
find_package(Qt5Keychain)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(TARGET Qt5Keychain::Qt5Keychain)
|
if(TARGET Qt5Keychain::Qt5Keychain)
|
||||||
message("Using system library for Qt5 Keychain")
|
message("Using system library for Qt5 Keychain")
|
||||||
|
|
||||||
set(LIBRARIES Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
set(LIBRARIES Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
||||||
|
set(KEYCHAIN_INCLUDE_DIRS ${QTKEYCHAIN_INCLUDE_DIRS}/qt5keychain) # this is to be consistent with the built-in lib?
|
||||||
|
else()
|
||||||
|
message("Using built-in qt keychain")
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
qtkeychain
|
||||||
|
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||||
|
GIT_TAG v0.12.0
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BUILD_WITH_QT6 OFF CACHE BOOL "" FORCE)
|
||||||
|
set(QTKEYCHAIN_STATIC ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(qtkeychain)
|
||||||
|
|
||||||
|
set(LIBRARIES qt5keychain ${LIBRARIES})
|
||||||
|
set(KEYCHAIN_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
||||||
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT USE_OWN_LIBRARIES)
|
||||||
|
find_package(QuaZip-Qt5)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(QuaZip-Qt5)
|
|
||||||
if(TARGET QuaZip::QuaZip)
|
if(TARGET QuaZip::QuaZip)
|
||||||
message("Using system library for Quazip")
|
message("Using system library for Quazip")
|
||||||
|
|
||||||
set(LIBRARIES QuaZip::QuaZip ${LIBRARIES})
|
set(LIBRARIES QuaZip::QuaZip ${LIBRARIES})
|
||||||
|
else()
|
||||||
|
message("Using built-in quazip")
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
quazip
|
||||||
|
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
||||||
|
GIT_TAG v1.2
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(quazip)
|
||||||
|
|
||||||
|
set(LIBRARIES QuaZip ${LIBRARIES})
|
||||||
|
set(QUAZIP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/_deps/quazip-src/quazip)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(external)
|
add_subdirectory(external)
|
||||||
|
|
||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
Qt5::Core Qt5::Widgets Qt5::Network Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
Qt5::Core Qt5::Widgets Qt5::Network ${LIBRARIES})
|
||||||
|
|
||||||
if(ENABLE_WATCHDOG)
|
if(ENABLE_WATCHDOG)
|
||||||
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
||||||
|
|
4
external/CMakeLists.txt
vendored
4
external/CMakeLists.txt
vendored
|
@ -1,6 +1,8 @@
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
||||||
|
message("Using built-in qt keychain")
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
qtkeychain
|
qtkeychain
|
||||||
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||||
|
@ -20,6 +22,8 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
if(NOT TARGET QuaZip::QuaZip)
|
if(NOT TARGET QuaZip::QuaZip)
|
||||||
|
message("Using built-in quazip")
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
quazip
|
quazip
|
||||||
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <qt5keychain/keychain.h>
|
#include <keychain.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "launcherwindow.h"
|
#include "launcherwindow.h"
|
||||||
|
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <qt5keychain/keychain.h>
|
#include <keychain.h>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <qt5keychain/keychain.h>
|
#include <keychain.h>
|
||||||
|
|
||||||
#include "sapphirelauncher.h"
|
#include "sapphirelauncher.h"
|
||||||
#include "squareboot.h"
|
#include "squareboot.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue