CMakeLists.txt 1.59 KB
Newer Older
1
project(breeze-plymouth)
2
set(PROJECT_VERSION "5.25.4")
3
4
5
6
7
set(PROJECT_VERSION_MAJOR 5)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)

find_package(ECM 1.8.0 REQUIRED NO_MODULE)
8
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} )
9
10

include(FeatureSummary)
11
include(KDEClangFormat)
12
include(KDEGitCommitHooks)
13
14
15

find_package(Plymouth REQUIRED)

16
17
find_library(MATH_LIBRARY m)

18
19
20
21
# Otherwise MODULE libs have a lib prefix, which is not compatible with
# plymouth plugin names (i.e we want breeze-text.so not libbreeze-text.so).
set(CMAKE_SHARED_MODULE_PREFIX "")

22
23
24
25
26
27
28
29
30
31
if(NOT DISTRO_NAME AND "${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.22.0")
    cmake_host_system_information(RESULT PRETTY_NAME QUERY DISTRIB_PRETTY_NAME)
endif()

if(NOT PRETTY_NAME)
    set(PRETTY_NAME "Plasma ${PROJECT_VERSION}")
endif()

set(DISTRO_NAME "${PRETTY_NAME}" CACHE STRING "Name to use on splash screen (defaults to os-release)")
set(DISTRO_VERSION "" CACHE STRING "Version to use on splash screen") # prefer to have the version in the name, makes it easier for os-release data
32
33

add_feature_info(DISTRO_NAME On "name to use on splash screen is '${DISTRO_NAME}'")
34
add_feature_info(DISTRO_VERSION On "extra version to use on splash screen is '${DISTRO_VERSION}'")
35

36
add_subdirectory(breeze-text)
37
add_subdirectory(breeze)
38

39
# add clang-format target for all our real source files
40
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
41
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
42
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
43

44
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)