mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Use system libraries when possible
This commit is contained in:
parent
7ebf8a88c4
commit
cfbefac6ac
3 changed files with 43 additions and 24 deletions
|
@ -35,7 +35,7 @@ set(SRC
|
||||||
include/gamescopesettingswindow.h)
|
include/gamescopesettingswindow.h)
|
||||||
|
|
||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
Qt5::Core Qt5::Widgets Qt5::Network qt5keychain QuaZip)
|
Qt5::Core Qt5::Widgets Qt5::Network ${KEYCHAIN_LIBRARIES} ${QUAZIP_LIBRARIES})
|
||||||
|
|
||||||
if(ENABLE_WATCHDOG)
|
if(ENABLE_WATCHDOG)
|
||||||
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
||||||
|
@ -63,9 +63,8 @@ target_include_directories(astra
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
${KEYCHAIN_INCLUDE_DIRS}
|
||||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build
|
${QUAZIP_INCLUDE_DIRS})
|
||||||
${CMAKE_BINARY_DIR}/_deps/quazip-src)
|
|
||||||
|
|
||||||
if(ENABLE_WATCHDOG)
|
if(ENABLE_WATCHDOG)
|
||||||
target_include_directories(astra PRIVATE ${TESSERACT_INCLUDE_DIRS} ${LEPTONICA_INCLUDE_DIRS})
|
target_include_directories(astra PRIVATE ${TESSERACT_INCLUDE_DIRS} ${LEPTONICA_INCLUDE_DIRS})
|
||||||
|
@ -74,11 +73,10 @@ if(ENABLE_WATCHDOG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS astra
|
install(TARGETS astra
|
||||||
DESTINATION "${INSTALL_BIN_PATH}"
|
DESTINATION "${INSTALL_BIN_PATH}")
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
get_target_property(QMAKE_EXE Qt6::qmake IMPORTED_LOCATION)
|
get_target_property(QMAKE_EXE Qt5::qmake IMPORTED_LOCATION)
|
||||||
get_filename_component(QT_BIN_DIR "${QMAKE_EXE}" DIRECTORY)
|
get_filename_component(QT_BIN_DIR "${QMAKE_EXE}" DIRECTORY)
|
||||||
|
|
||||||
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
|
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
|
||||||
|
|
21
external/CMakeLists.txt
vendored
21
external/CMakeLists.txt
vendored
|
@ -1,5 +1,8 @@
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
|
find_package(QtKeychain-Qt5)
|
||||||
|
|
||||||
|
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
qtkeychain
|
qtkeychain
|
||||||
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||||
|
@ -11,9 +14,27 @@ set(QTKEYCHAIN_STATIC ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(qtkeychain)
|
FetchContent_MakeAvailable(qtkeychain)
|
||||||
|
|
||||||
|
set(KEYCHAIN_LIBRARIES qt5keychain PARENT_SCOPE)
|
||||||
|
set(KEYCHAIN_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
||||||
|
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
set(KEYCHAIN_LIBRARIES Qt5Keychain::Qt5Keychain PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#quazip
|
||||||
|
find_package(QuaZip-Qt5)
|
||||||
|
if(NOT TARGET QuaZip::QuaZip)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
quazip
|
quazip
|
||||||
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
||||||
GIT_TAG v1.2
|
GIT_TAG v1.2
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(quazip)
|
FetchContent_MakeAvailable(quazip)
|
||||||
|
|
||||||
|
set(QUAZIP_LIBRARIES 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()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
|
||||||
#include <quazip/JlCompress.h>
|
#include <JlCompress.h>
|
||||||
|
|
||||||
#include "launchercore.h"
|
#include "launchercore.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue