File: CMakeLists.txt

package info (click to toggle)
razorqt 0.5.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 38,864 kB
  • ctags: 4,218
  • sloc: cpp: 34,081; sh: 2,589; php: 286; xml: 240; python: 138; perl: 73; makefile: 33
file content (185 lines) | stat: -rw-r--r-- 5,059 bytes parent folder | download
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
cmake_minimum_required( VERSION 2.6 )

if (NOT CMAKE_BUILD_TYPE)
    set ( CMAKE_BUILD_TYPE Release )
endif (NOT CMAKE_BUILD_TYPE)

if (CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
    message(STATUS "Debug build")
    add_definitions(-DDEBUG)
else()
    message(STATUS "non-debug build")
    add_definitions(-DNDEBUG)
endif()

if (NOT CMAKE_INSTALL_PREFIX)
    message(FATAL_ERROR "CMAKE_INSTALL_PREFIX is not set but it has to be. Something is wrong.")
endif ()

set(MAJOR_VERSION 0)
set(MINOR_VERSION 5)
set(PATCH_VERSION 2)
set(RAZOR_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
add_definitions(-DRAZOR_VERSION=\"${RAZOR_VERSION}\")
message(STATUS "")
message(STATUS "Razor-qt version: ${RAZOR_VERSION}")
message(STATUS "")

link_directories(/usr/local/lib/)

add_definitions ( -Wall )
set( QT_USE_QTDBUS 1 )
find_package ( Qt4 4.6.0 REQUIRED )
include ( ${QT_USE_FILE} )
include_directories (
	${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
	)

# additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# Qt *must* be detected before this one
include(RazorInstallConfigPath)
add_definitions(-DRAZOR_ETC_XDG_DIRECTORY=\"${RAZOR_ETC_XDG_DIRECTORY}\")
include(RazorLibSuffix)


# This allows to install and read the configs from non-standard locations
add_definitions(-DSHARE_DIR=\"${CMAKE_INSTALL_PREFIX}/share/razor/\")

message(STATUS "")
message(STATUS "Developer documentation (doxygen) can be generated by 'make doc'")
message(STATUS "")

message(STATUS "")
message(STATUS "For building tests use -DBUILD_TESTS=Yes option.")
message(STATUS "")

# main build subdirs
macro (build_module MODULE_VAR MODULE_NAME MODULE_DIR MODULE_DEFAULT)
    if(SPLIT_BUILD)
        set(MODULE_BUILD_DEFAULT Off)
    else(SPLIT_BUILD)
        set(MODULE_BUILD_DEFAULT ${MODULE_DEFAULT})
    endif(SPLIT_BUILD)
    option(${MODULE_VAR} ${MODULE_NAME} ${MODULE_BUILD_DEFAULT})
    if(${MODULE_VAR})
        #message(STATUS "Build: ${MODULE_NAME}")
        add_subdirectory(${MODULE_DIR})
        list(APPEND ENABLED_MODULES "${MODULE_NAME}")
    #else()
    #   message(STATUS "Skip:  ${MODULE_VAR}")
    endif(${MODULE_VAR})
endmacro()

build_module(MODULE_QTXDG
    "Qt library for XDG standards"
    libraries/qtxdg On)

build_module(MODULE_LIBRAZORQT
    "Core Razor library"
    libraries/razorqt On)

build_module(MODULE_LIBRAZORQXT
    "Razor global hotkey library"
    libraries/razorqxt On)

build_module(MODULE_LIBRAZORMOUNT
    "Razor mount library"
    libraries/razormount On)

build_module(MODULE_RESOURCES
    "Razor resources"
    razorqt-resources On)

build_module(MODULE_SESSION
    "Razor Session manager"
    razorqt-session On)

build_module(MODULE_PANEL
    "Razor Panel"
    razorqt-panel On)

build_module(MODULE_DESKTOP
    "Razor Desktop"
    razorqt-desktop On)

build_module(MODULE_APPSWITCHER
    "Razor Alt-Tab Application switcher"
    razorqt-appswitcher On)

build_module(MODULE_X11INFO
    "X11 info"
    razorqt-x11info On)

build_module(MODULE_RUNNER
    "Razor Runner"
    razorqt-runner On)

build_module(MODULE_CONFIG
    "Razor Configuration"
    razorqt-config On)

build_module(MODULE_POWER
    "Razor power control"
    razorqt-power On)

build_module(MODULE_AUTOSUSPEND
    "Razor Autosuspend"
    razorqt-autosuspend On)

build_module(MODULE_POLICYKIT
    "Razor PolicyKit agent"
    razorqt-policykit On)

build_module(MODULE_LIGHTDM
    "Razor LightDM greeter"
    razorqt-lightdm-greeter On)

build_module(MODULE_NOTIFICATIOND
    "Razor Notifications Daemon"
    razorqt-notificationd On)

build_module(MODULE_ASKPASS
    "SSH Askpass"
    razorqt-openssh-askpass On)

build_module(MODULE_ABOUT
    "Razor information"
    razorqt-about On)

build_module(MODULE_GLOBALKEYSHORTCUTS
    "Global Shortcut daemon"
    razorqt-globalkeyshortcuts On)

build_module(MODULE_CONFUPDATE
    "Configuration updater"
    razorqt-confupdate On)

message(STATUS  "**************** The following modules will be built ****************")
foreach (MODULE_NAME ${ENABLED_MODULES})
    message(STATUS   "  ${MODULE_NAME}")
endforeach()
message(STATUS  "*********************************************************************")

########### Add uninstall target ###############
CONFIGURE_FILE(
    "${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
    IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET(uninstall
    "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")



########## Add make dist target ################
SET(CPACK_PACKAGE_VERSION "${RAZOR_VERSION}")
SET(CPACK_SOURCE_GENERATOR "TBZ2")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "razorqt-${CPACK_PACKAGE_VERSION}")
SET(CPACK_IGNORE_FILES "/CVS/;/\\\\.git\;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;\\\\.tar.gz$;/CMakeFiles/;CMakeCache.txt;refresh-copyright-and-license.pl")
SET(CPACK_SOURCE_IGNORE_FILES ${CPACK_IGNORE_FILES})
INCLUDE(CPack)
# simulate autotools' "make dist"
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)

add_subdirectory( doxygen )