File: CMakeLists.txt

package info (click to toggle)
plasma-mediacenter 5.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,268 kB
  • sloc: cpp: 8,057; makefile: 5; sh: 4
file content (93 lines) | stat: -rw-r--r-- 2,913 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
project(PlasmaMediaCenter)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)

set(QT_MIN_VERSION "5.3.0")
set (KF5_MIN_VERSION "5.5.0")

set(PROJECT_VERSION "5.7.3")
set(PROJECT_VERSION_MAJOR "5")

find_package(ECM 0.0.8 REQUIRED NO_MODULE)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(GenerateExportHeader)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(ECMMarkNonGuiExecutable)

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)

include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
        message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

find_package(Qt5 CONFIG REQUIRED COMPONENTS Core DBus Xml Quick Test)

find_package(Qt5Multimedia QUIET)
set_package_properties(Qt5Multimedia PROPERTIES
        PURPOSE "Qt5Multimedia QML bindings are required at runtime to play media files"
        TYPE RUNTIME)

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)

# Load the frameworks we need
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS REQUIRED
    CoreAddons Config I18n GuiAddons Service KIO Declarative Activities Plasma PlasmaQuick)

find_package(KF5Baloo)
add_feature_info("KF5Baloo" KF5Baloo_FOUND "Required for Baloo integration")
find_package(Taglib REQUIRED)

include_directories(
    ${TAGLIB_INCLUDES}
)

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_BINARY_DIR}
    libs/
)

# if plasma-workspace is installed in different prefix then pmc then it will not work

set(STARTKDE_BINARY_DIR ${CMAKE_INSTALL_FULL_BINDIR})

configure_file(plasma-mediacenter.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mediacenter.desktop)
install(FILES
        ${CMAKE_CURRENT_BINARY_DIR}/plasma-mediacenter.desktop
        DESTINATION ${DATA_INSTALL_DIR}/xsessions
)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE_ENABLE_EXCEPTIONS}")
set(CMAKE_AUTOMOC ON)

add_subdirectory(browsingbackends)
add_subdirectory(datasources)
#add_subdirectory(onlineservices)
add_subdirectory(mediaelements)
add_subdirectory(components)
add_subdirectory(libs)
add_subdirectory(shells)
add_subdirectory(images)
add_subdirectory(tests)
add_subdirectory(autotests)
#
# include(MacroOptionalAddSubdirectory)
# macro_optional_add_subdirectory( po )

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

find_package(KF5I18n CONFIG REQUIRED)
ki18n_install(po)