-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
95 lines (73 loc) · 2.51 KB
/
CMakeLists.txt
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
94
95
project(shaman)
cmake_minimum_required(VERSION 2.6.0)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# Versioning
set(MAJOR_SHAMAN_VERSION "1")
set(MINOR_SHAMAN_VERSION "2")
set(PATCH_SHAMAN_VERSION "81")
set(ADDENDUM_SHAMAN_VERSION "(beta1)")
set(SHAMAN_VERSION_STRING "${MAJOR_SHAMAN_VERSION}.${MINOR_SHAMAN_VERSION}.${PATCH_SHAMAN_VERSION}${ADDENDUM_SHAMAN_VERSION}")
set(SHAMAN_VERSION_CODENAME "")
set(SHAMAN_VERSION_REVISION "")
# requires minimal Qt 4.4
set(QT_MIN_VERSION "4.4.0")
set(SHARED_MIME_INFO_MINIMUM_VERSION "0.20")
find_package(Automoc4 REQUIRED)
find_package(Qt4 REQUIRED)
find_package(SharedMimeInfo REQUIRED)
find_package(PolkitQt REQUIRED)
find_package(Aqpm REQUIRED)
if (KDE4_INTEGRATION)
find_package(KDE4 REQUIRED)
include (MacroLibrary)
include (FindPackageHandleStandardArgs)
include (KDE4Defaults)
endif (KDE4_INTEGRATION)
configure_file(config-shaman1.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-shaman1.h )
include (ShamanMacros)
include(${QT_USE_FILE})
set(QT_USE_QTXML)
include_directories(
${QT_INCLUDES}
${AQPM_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src
${POLKITQT_INCLUDE_DIR}
${KDE4_INCLUDES}
)
add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
if(NOT PLASMA_ONLY)
add_subdirectory(ui)
add_subdirectory(dbus)
add_subdirectory(src)
add_subdirectory(translations)
add_subdirectory(etc)
else(NOT PLASMA_ONLY)
message("Building only plasma components, skipping shaman core")
endif(NOT PLASMA_ONLY)
if(NOT NO_PLASMA)
if (PLASMA_FOUND)
# add_subdirectory(plasma)
else (PLASMA_FOUND)
message("Plasma not found, plasma components won't be built")
endif(PLASMA_FOUND)
else(NOT NO_PLASMA)
message("Plasma components disabled by the user, they won't be built")
endif(NOT NO_PLASMA)
add_subdirectory(firstrun)
## Source tarball ##
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${SHAMAN_VERSION_STRING})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})