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,15 +35,15 @@ set(SRC
|
|||
include/gamescopesettingswindow.h)
|
||||
|
||||
set(LIBRARIES
|
||||
Qt5::Core Qt5::Widgets Qt5::Network qt5keychain QuaZip)
|
||||
Qt5::Core Qt5::Widgets Qt5::Network ${KEYCHAIN_LIBRARIES} ${QUAZIP_LIBRARIES})
|
||||
|
||||
if(ENABLE_WATCHDOG)
|
||||
set(LIBRARIES ${LIBRARIES} ${TESSERACT_LIBRARIES} ${LEPTONICA_LIBRARIES})
|
||||
|
||||
set(SRC ${SRC}
|
||||
include/watchdog.h
|
||||
include/watchdog.h
|
||||
src/watchdog.cpp
|
||||
include/gameparser.h
|
||||
include/gameparser.h
|
||||
src/gameparser.cpp)
|
||||
endif()
|
||||
|
||||
|
@ -63,9 +63,8 @@ target_include_directories(astra
|
|||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-src
|
||||
${CMAKE_BINARY_DIR}/_deps/qtkeychain-build
|
||||
${CMAKE_BINARY_DIR}/_deps/quazip-src)
|
||||
${KEYCHAIN_INCLUDE_DIRS}
|
||||
${QUAZIP_INCLUDE_DIRS})
|
||||
|
||||
if(ENABLE_WATCHDOG)
|
||||
target_include_directories(astra PRIVATE ${TESSERACT_INCLUDE_DIRS} ${LEPTONICA_INCLUDE_DIRS})
|
||||
|
@ -74,11 +73,10 @@ if(ENABLE_WATCHDOG)
|
|||
endif()
|
||||
|
||||
install(TARGETS astra
|
||||
DESTINATION "${INSTALL_BIN_PATH}"
|
||||
)
|
||||
DESTINATION "${INSTALL_BIN_PATH}")
|
||||
|
||||
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)
|
||||
|
||||
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
|
||||
|
|
49
external/CMakeLists.txt
vendored
49
external/CMakeLists.txt
vendored
|
@ -1,19 +1,40 @@
|
|||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
qtkeychain
|
||||
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||
GIT_TAG v0.12.0
|
||||
)
|
||||
find_package(QtKeychain-Qt5)
|
||||
|
||||
set(BUILD_WITH_QT6 OFF CACHE BOOL "" FORCE)
|
||||
set(QTKEYCHAIN_STATIC ON CACHE BOOL "" FORCE)
|
||||
if(NOT TARGET Qt5Keychain::Qt5Keychain)
|
||||
FetchContent_Declare(
|
||||
qtkeychain
|
||||
GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git
|
||||
GIT_TAG v0.12.0
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(qtkeychain)
|
||||
set(BUILD_WITH_QT6 OFF CACHE BOOL "" FORCE)
|
||||
set(QTKEYCHAIN_STATIC ON CACHE BOOL "" FORCE)
|
||||
|
||||
FetchContent_Declare(
|
||||
quazip
|
||||
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
||||
GIT_TAG v1.2
|
||||
)
|
||||
FetchContent_MakeAvailable(quazip)
|
||||
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(
|
||||
quazip
|
||||
GIT_REPOSITORY https://github.com/stachenov/quazip.git
|
||||
GIT_TAG v1.2
|
||||
)
|
||||
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 <QJsonArray>
|
||||
|
||||
#include <quazip/JlCompress.h>
|
||||
#include <JlCompress.h>
|
||||
|
||||
#include "launchercore.h"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue