mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-24 05:17:46 +00:00
Attempt to use system libraries (properly this time)
This commit is contained in:
parent
2092a351d1
commit
0a34dd676e
5 changed files with 22 additions and 16 deletions
|
@ -15,7 +15,6 @@ if(ENABLE_WATCHDOG)
|
||||||
pkg_search_module(LEPTONICA REQUIRED lept)
|
pkg_search_module(LEPTONICA REQUIRED lept)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(external)
|
|
||||||
|
|
||||||
set(SRC
|
set(SRC
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
|
@ -34,8 +33,24 @@ set(SRC
|
||||||
src/gamescopesettingswindow.cpp
|
src/gamescopesettingswindow.cpp
|
||||||
include/gamescopesettingswindow.h)
|
include/gamescopesettingswindow.h)
|
||||||
|
|
||||||
|
find_package(Qt5Keychain)
|
||||||
|
if(TARGET Qt5Keychain::Qt5Keychain)
|
||||||
|
message("Using system library for Qt5 Keychain")
|
||||||
|
|
||||||
|
set(LIBRARIES Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(QuaZip-Qt5)
|
||||||
|
if(TARGET QuaZip::QuaZip)
|
||||||
|
message("Using system library for Quazip")
|
||||||
|
|
||||||
|
set(LIBRARIES QuaZip::QuaZip ${LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(external)
|
||||||
|
|
||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
Qt5::Core Qt5::Widgets Qt5::Network ${KEYCHAIN_LIBRARIES} ${QUAZIP_LIBRARIES})
|
Qt5::Core Qt5::Widgets Qt5::Network Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
||||||
|
|
||||||
if(ENABLE_WATCHDOG)
|
if(ENABLE_WATCHDOG)
|
||||||
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
||||||
|
@ -58,7 +73,6 @@ add_executable(astra ${SRC})
|
||||||
|
|
||||||
target_link_libraries(astra PUBLIC ${LIBRARIES})
|
target_link_libraries(astra PUBLIC ${LIBRARIES})
|
||||||
|
|
||||||
# disgusting, thanks qtkeychain and quazip
|
|
||||||
target_include_directories(astra
|
target_include_directories(astra
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||||
|
|
12
external/CMakeLists.txt
vendored
12
external/CMakeLists.txt
vendored
|
@ -1,7 +1,5 @@
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
find_package(QtKeychain-Qt5)
|
|
||||||
|
|
||||||
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
qtkeychain
|
qtkeychain
|
||||||
|
@ -14,17 +12,13 @@ if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(qtkeychain)
|
FetchContent_MakeAvailable(qtkeychain)
|
||||||
|
|
||||||
set(KEYCHAIN_LIBRARIES qt5keychain PARENT_SCOPE)
|
set(LIBRARIES qt5keychain ${LIBRARIES} PARENT_SCOPE)
|
||||||
set(KEYCHAIN_INCLUDE_DIRS
|
set(KEYCHAIN_INCLUDE_DIRS
|
||||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
||||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build PARENT_SCOPE)
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build PARENT_SCOPE)
|
||||||
else()
|
|
||||||
set(KEYCHAIN_LIBRARIES Qt5Keychain::Qt5Keychain PARENT_SCOPE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
#quazip
|
|
||||||
find_package(QuaZip-Qt5)
|
|
||||||
if(NOT TARGET QuaZip::QuaZip)
|
if(NOT TARGET QuaZip::QuaZip)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
quazip
|
quazip
|
||||||
|
@ -33,8 +27,6 @@ if(NOT TARGET QuaZip::QuaZip)
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(quazip)
|
FetchContent_MakeAvailable(quazip)
|
||||||
|
|
||||||
set(QUAZIP_LIBRARIES QuaZip PARENT_SCOPE)
|
set(LIBRARIES QuaZip ${LIBRARIES} PARENT_SCOPE)
|
||||||
set(QUAZIP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/_deps/quazip-src/quazip PARENT_SCOPE)
|
set(QUAZIP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/_deps/quazip-src/quazip PARENT_SCOPE)
|
||||||
else()
|
|
||||||
set(QUAZIP_LIBRARIES QuaZip::QuaZip PARENT_SCOPE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <keychain.h>
|
#include <qt5keychain/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 <keychain.h>
|
#include <qt5keychain/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 <keychain.h>
|
#include <qt5keychain/keychain.h>
|
||||||
|
|
||||||
#include "sapphirelauncher.h"
|
#include "sapphirelauncher.h"
|
||||||
#include "squareboot.h"
|
#include "squareboot.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue