2021-11-01 09:54:58 -04:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2022-02-23 19:00:17 -05:00
|
|
|
project(Astra)
|
2021-11-01 09:54:58 -04:00
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
2022-06-08 12:06:44 -04:00
|
|
|
set(CMAKE_AUTORCC ON)
|
2021-11-01 09:54:58 -04:00
|
|
|
|
2022-06-08 12:06:44 -04:00
|
|
|
find_package(Qt5 COMPONENTS Core Widgets Network Quick CONFIG REQUIRED)
|
2021-11-01 09:54:58 -04:00
|
|
|
|
2022-01-27 09:25:23 -05:00
|
|
|
option(ENABLE_WATCHDOG "Build with Tesseract support (needed for Watchdog)" OFF)
|
2022-03-01 17:21:29 -05:00
|
|
|
option(USE_OWN_LIBRARIES "Build with own libraries" OFF)
|
2022-04-17 22:31:22 -04:00
|
|
|
option(BUILD_FLATPAK "Build with Flatpak support in mind" OFF)
|
2022-09-05 15:43:15 -04:00
|
|
|
option(USE_STEAM "Build with Steam support" OFF)
|
2022-09-05 17:10:37 -04:00
|
|
|
option(USE_GAMEMODE "Build with GameMode support" ON)
|
2022-01-27 09:25:23 -05:00
|
|
|
|
2022-08-15 11:14:37 -04:00
|
|
|
if (ENABLE_WATCHDOG)
|
2022-01-27 09:25:23 -05:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_search_module(TESSERACT REQUIRED tesseract)
|
|
|
|
pkg_search_module(LEPTONICA REQUIRED lept)
|
2022-08-15 11:14:37 -04:00
|
|
|
endif ()
|
2022-01-27 09:25:23 -05:00
|
|
|
|
2022-09-05 17:10:37 -04:00
|
|
|
if (USE_GAMEMODE)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_search_module(GAMEMODE REQUIRED gamemode)
|
|
|
|
endif()
|
|
|
|
|
2022-03-01 17:21:29 -05:00
|
|
|
include(FetchContent)
|
|
|
|
|
2022-09-05 15:43:15 -04:00
|
|
|
if(USE_STEAM)
|
|
|
|
add_library(Steamworks IMPORTED STATIC)
|
|
|
|
set_target_properties(Steamworks PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES ${STEAMWORKS_INCLUDE_DIR}
|
|
|
|
IMPORTED_LOCATION ${STEAMWORKS_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2022-09-05 17:29:51 -04:00
|
|
|
find_package(Qt5Keychain)
|
|
|
|
set(LIBRARIES Qt5Keychain::Qt5Keychain ${LIBRARIES})
|
2022-03-01 17:21:29 -05:00
|
|
|
|
2022-09-05 17:29:51 -04:00
|
|
|
find_package(QuaZip-Qt5)
|
|
|
|
set(LIBRARIES QuaZip::QuaZip ${LIBRARIES})
|
2022-03-27 21:08:27 -04:00
|
|
|
|
2022-09-05 17:29:51 -04:00
|
|
|
find_package(fmt)
|
|
|
|
set(LIBRARIES fmt::fmt ${LIBRARIES})
|
2022-03-27 21:08:27 -04:00
|
|
|
|
2022-03-01 16:58:47 -05:00
|
|
|
add_subdirectory(external)
|
|
|
|
|
2022-06-08 12:45:12 -04:00
|
|
|
add_subdirectory(launcher)
|