1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 12:57:45 +00:00
astra/CMakeLists.txt

42 lines
1.5 KiB
Text
Raw Normal View History

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
# build options used for distributors
option(BUILD_FLATPAK "Build for Flatpak." OFF)
# options for features you may want or need
option(ENABLE_WATCHDOG "Build support for Watchdog, requires an X11 system." OFF)
option(ENABLE_STEAM "Build with Steam support, requires supplying the Steam SDK." OFF)
option(ENABLE_GAMEMODE "Build with Feral GameMode support, requires the daemon to be installed." ON)
option(ENABLE_TABLET "Build support for the tablet interface, meant for devices like the Steam Deck." ON)
option(ENABLE_DESKTOP "Build support for the desktop interface, meant to be used on desktops and laptops." ON)
option(ENABLE_CLI "Build support for the command-line interface, meant for scripting and automation." ON)
2021-11-01 09:54:58 -04:00
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
2021-11-01 09:54:58 -04:00
find_package(Qt5 COMPONENTS Core Widgets Network Quick CONFIG REQUIRED)
2021-11-01 09:54:58 -04: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
if (ENABLE_GAMEMODE)
find_package(PkgConfig REQUIRED)
pkg_search_module(GAMEMODE REQUIRED gamemode)
endif ()
if (ENABLE_STEAM)
2022-09-07 23:54:17 -04:00
add_library(Steamworks IMPORTED SHARED)
set_target_properties(Steamworks PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${STEAMWORKS_INCLUDE_DIR}
IMPORTED_LOCATION ${STEAMWORKS_LIBRARIES})
endif ()
find_package(Qt5Keychain REQUIRED)
find_package(QuaZip-Qt5 REQUIRED)
add_subdirectory(external)
2022-06-08 12:45:12 -04:00
add_subdirectory(launcher)