Add ECM, ki18n dependency, and configure clang format automatically
This commit is contained in:
parent
cab88bf23f
commit
6920e0c123
1 changed files with 29 additions and 5 deletions
|
@ -2,19 +2,37 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(Redai)
|
||||
project(Redai VERSION 0.1.0 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS
|
||||
set(QT_MIN_VERSION 5.15)
|
||||
set(KF5_MIN_VERSION 5.83)
|
||||
|
||||
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(ECMFindQmlModule)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
include(ECMSetupVersion)
|
||||
include(ECMGenerateHeaders)
|
||||
include(ECMPoQmTools)
|
||||
include(KDEGitCommitHooks)
|
||||
include(KDEClangFormat)
|
||||
|
||||
find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE REQUIRED COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Concurrent
|
||||
REQUIRED)
|
||||
Concurrent)
|
||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n)
|
||||
|
||||
add_executable(Redai)
|
||||
target_sources(Redai PRIVATE
|
||||
|
@ -34,5 +52,11 @@ target_link_libraries(Redai
|
|||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt5::Concurrent
|
||||
)
|
||||
KF5::I18n)
|
||||
|
||||
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)
|
Loading…
Add table
Reference in a new issue