2023-08-06 08:48:11 -04:00
|
|
|
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2023-04-09 15:32:47 -04:00
|
|
|
cmake_minimum_required(VERSION 3.25)
|
2023-09-23 14:59:55 -04:00
|
|
|
project(Novus VERSION 0.1.0 LANGUAGES CXX)
|
2022-03-15 15:34:38 -04:00
|
|
|
|
2023-09-23 14:59:55 -04:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2022-03-16 00:31:24 -04:00
|
|
|
|
2023-10-10 18:32:17 -04:00
|
|
|
set(QT_MIN_VERSION 6.5)
|
|
|
|
set(KF_MIN_VERSION 5.240)
|
2023-09-23 15:02:13 -04:00
|
|
|
|
2023-09-26 00:37:55 -04:00
|
|
|
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
|
2023-09-23 15:02:13 -04:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
2023-09-23 14:51:47 -04:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
|
|
|
2023-09-23 15:02:13 -04:00
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(ECMFindQmlModule)
|
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(KDECompilerSettings NO_POLICY_SCOPE)
|
|
|
|
include(ECMSetupVersion)
|
|
|
|
include(ECMGenerateHeaders)
|
|
|
|
include(ECMPoQmTools)
|
|
|
|
include(KDEGitCommitHooks)
|
|
|
|
include(KDEClangFormat)
|
|
|
|
include(FeatureSummary)
|
|
|
|
include(FetchContent)
|
2024-04-24 22:31:40 -04:00
|
|
|
include(ECMGenerateExportHeader)
|
2024-04-25 19:11:00 -04:00
|
|
|
include(ECMAddAppIcon)
|
2023-09-23 15:02:13 -04:00
|
|
|
|
|
|
|
ecm_setup_version(${PROJECT_VERSION}
|
2023-12-10 06:51:33 -05:00
|
|
|
VARIABLE_PREFIX NOVUS
|
|
|
|
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/novus-version.h
|
2023-09-23 15:02:13 -04:00
|
|
|
)
|
|
|
|
|
2024-04-24 17:39:43 -04:00
|
|
|
find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Core Widgets Concurrent Sql HttpServer Network CONFIG REQUIRED)
|
2024-02-04 15:04:01 -05:00
|
|
|
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Config XmlGui Archive I18n)
|
2023-09-23 14:57:56 -04:00
|
|
|
find_package(Vulkan REQUIRED)
|
|
|
|
find_package(glm REQUIRED)
|
2023-09-25 21:57:55 -04:00
|
|
|
if (NOT TARGET glm::glm)
|
|
|
|
add_library(glm::glm ALIAS glm)
|
2023-12-10 06:51:33 -05:00
|
|
|
endif ()
|
2022-03-16 00:31:24 -04:00
|
|
|
|
2022-08-04 11:32:12 -04:00
|
|
|
add_subdirectory(extern)
|
2022-04-11 23:11:33 -04:00
|
|
|
add_subdirectory(renderer)
|
2023-10-10 18:02:13 -04:00
|
|
|
add_subdirectory(karuku)
|
2023-07-09 11:31:18 -04:00
|
|
|
add_subdirectory(armoury)
|
2022-04-14 19:00:42 -04:00
|
|
|
add_subdirectory(argcracker)
|
2023-10-10 18:02:13 -04:00
|
|
|
add_subdirectory(sagasu)
|
2023-07-08 10:33:12 -04:00
|
|
|
add_subdirectory(parts)
|
2023-07-09 11:52:59 -04:00
|
|
|
add_subdirectory(common)
|
2024-02-02 14:29:48 -05:00
|
|
|
add_subdirectory(mapeditor)
|
2023-08-31 14:18:50 +02:00
|
|
|
add_subdirectory(mdlviewer)
|
2023-10-10 18:02:13 -04:00
|
|
|
add_subdirectory(launcher)
|
2023-09-23 15:02:13 -04:00
|
|
|
|
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
|
|
|
|
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
|
|
|
|
|
|
|
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|