blob: 40c1cd88b0b8d0280eaf21ca0ef120cd454d1912 (
plain)
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
|
project(KDEInstallDirs.vars_defined)
cmake_minimum_required(VERSION 2.8.12)
set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../kde-modules)
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules)
set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}")
include(KDEInstallDirs)
set(misc_vars
CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
INSTALL_TARGETS_DEFAULT_ARGS
KF5_INSTALL_TARGETS_DEFAULT_ARGS
)
set(relative_path_vars
# old-style variables
AUTOSTART_INSTALL_DIR
BIN_INSTALL_DIR
CMAKECONFIG_INSTALL_PREFIX
CONFIG_INSTALL_DIR
DATA_INSTALL_DIR
DBUS_INTERFACES_INSTALL_DIR
DBUS_SERVICES_INSTALL_DIR
DBUS_SYSTEM_SERVICES_INSTALL_DIR
EXEC_INSTALL_PREFIX
HTML_INSTALL_DIR
ICON_INSTALL_DIR
INCLUDE_INSTALL_DIR
KCFG_INSTALL_DIR
KCONF_UPDATE_INSTALL_DIR
KF5_DATA_INSTALL_DIR
KF5_INCLUDE_INSTALL_DIR
KF5_LIBEXEC_INSTALL_DIR
KNOTIFYRC_INSTALL_DIR
KXMLGUI_INSTALL_DIR
LIBEXEC_INSTALL_DIR
LIB_INSTALL_DIR
LOCALE_INSTALL_DIR
MAN_INSTALL_DIR
QML_INSTALL_DIR
SBIN_INSTALL_DIR
SERVICES_INSTALL_DIR
SERVICETYPES_INSTALL_DIR
SHARE_INSTALL_PREFIX
SOUND_INSTALL_DIR
SYSCONF_INSTALL_DIR
TEMPLATES_INSTALL_DIR
WALLPAPER_INSTALL_DIR
XDG_APPS_INSTALL_DIR
XDG_DIRECTORY_INSTALL_DIR
XDG_MIME_INSTALL_DIR
# new-style variables
CMAKE_INSTALL_APPDIR
CMAKE_INSTALL_AUTOSTARTDIR
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_CMAKEPACKAGEDIR
CMAKE_INSTALL_CONFDIR
CMAKE_INSTALL_DATADIR
CMAKE_INSTALL_DATADIR_KF5
CMAKE_INSTALL_DATAROOTDIR
CMAKE_INSTALL_DBUSDIR
CMAKE_INSTALL_DBUSINTERFACEDIR
CMAKE_INSTALL_DBUSSERVICEDIR
CMAKE_INSTALL_DBUSSYSTEMSERVICEDIR
CMAKE_INSTALL_DESKTOPDIR
CMAKE_INSTALL_DOCBUNDLEDIR
CMAKE_INSTALL_EXECROOTDIR
CMAKE_INSTALL_ICONDIR
CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_INCLUDEDIR_KF5
CMAKE_INSTALL_INFODIR
CMAKE_INSTALL_KCFGDIR
CMAKE_INSTALL_KCONFUPDATEDIR
CMAKE_INSTALL_KNOTIFY5RCDIR
CMAKE_INSTALL_KXMLGUI5DIR
CMAKE_INSTALL_KSERVICES5DIR
CMAKE_INSTALL_KSERVICETYPES5DIR
CMAKE_INSTALL_LIBDIR
CMAKE_INSTALL_LIBEXECDIR
CMAKE_INSTALL_LIBEXECDIR_KF5
CMAKE_INSTALL_LOCALEDIR
CMAKE_INSTALL_LOCALSTATEDIR
CMAKE_INSTALL_MANDIR
CMAKE_INSTALL_MIMEDIR
CMAKE_INSTALL_METAINFODIR
CMAKE_INSTALL_QMLDIR
CMAKE_INSTALL_SBINDIR
CMAKE_INSTALL_SHAREDSTATEDIR
CMAKE_INSTALL_SOUNDDIR
CMAKE_INSTALL_SYSCONFDIR
CMAKE_INSTALL_TEMPLATEDIR
CMAKE_INSTALL_WALLPAPERDIR
)
set(absolute_path_vars
IMPORTS_INSTALL_DIR
PLUGIN_INSTALL_DIR
QT_PLUGIN_INSTALL_DIR
CMAKE_INSTALL_PLUGINDIR
CMAKE_INSTALL_QTPLUGINDIR
CMAKE_INSTALL_QTQUICKIMPORTSDIR
CMAKE_INSTALL_FULL_APPDIR
CMAKE_INSTALL_FULL_AUTOSTARTDIR
CMAKE_INSTALL_FULL_BINDIR
CMAKE_INSTALL_FULL_CMAKEPACKAGEDIR
CMAKE_INSTALL_FULL_CONFDIR
CMAKE_INSTALL_FULL_DATADIR
CMAKE_INSTALL_FULL_DATADIR_KF5
CMAKE_INSTALL_FULL_DATAROOTDIR
CMAKE_INSTALL_FULL_DBUSDIR
CMAKE_INSTALL_FULL_DBUSINTERFACEDIR
CMAKE_INSTALL_FULL_DBUSSERVICEDIR
CMAKE_INSTALL_FULL_DBUSSYSTEMSERVICEDIR
CMAKE_INSTALL_FULL_DESKTOPDIR
CMAKE_INSTALL_FULL_DOCBUNDLEDIR
CMAKE_INSTALL_FULL_EXECROOTDIR
CMAKE_INSTALL_FULL_ICONDIR
CMAKE_INSTALL_FULL_INCLUDEDIR
CMAKE_INSTALL_FULL_INCLUDEDIR_KF5
CMAKE_INSTALL_FULL_INFODIR
CMAKE_INSTALL_FULL_KCFGDIR
CMAKE_INSTALL_FULL_KCONFUPDATEDIR
CMAKE_INSTALL_FULL_KNOTIFY5RCDIR
CMAKE_INSTALL_FULL_KXMLGUI5DIR
CMAKE_INSTALL_FULL_KSERVICES5DIR
CMAKE_INSTALL_FULL_KSERVICETYPES5DIR
CMAKE_INSTALL_FULL_LIBDIR
CMAKE_INSTALL_FULL_LIBEXECDIR
CMAKE_INSTALL_FULL_LIBEXECDIR_KF5
CMAKE_INSTALL_FULL_LOCALEDIR
CMAKE_INSTALL_FULL_LOCALSTATEDIR
CMAKE_INSTALL_FULL_MANDIR
CMAKE_INSTALL_FULL_MIMEDIR
CMAKE_INSTALL_FULL_METAINFODIR
CMAKE_INSTALL_FULL_PLUGINDIR
CMAKE_INSTALL_FULL_QMLDIR
CMAKE_INSTALL_FULL_QTPLUGINDIR
CMAKE_INSTALL_FULL_QTQUICKIMPORTSDIR
CMAKE_INSTALL_FULL_SBINDIR
CMAKE_INSTALL_FULL_SHAREDSTATEDIR
CMAKE_INSTALL_FULL_SOUNDDIR
CMAKE_INSTALL_FULL_SYSCONFDIR
CMAKE_INSTALL_FULL_TEMPLATEDIR
CMAKE_INSTALL_FULL_WALLPAPERDIR
)
if(APPLE)
# The default bundle directory is an absolute path
list(APPEND absolute_path_vars
BUNDLE_INSTALL_DIR
CMAKE_INSTALL_BUNDLEDIR
CMAKE_INSTALL_FULL_BUNDLEDIR
)
endif()
foreach(variable ${misc_vars} ${relative_path_vars} ${absolute_path_vars})
if(NOT DEFINED ${variable})
message(SEND_ERROR "${variable} is not defined.")
endif()
endforeach()
foreach(variable ${relative_path_vars})
if(IS_ABSOLUTE ${${variable}})
message(SEND_ERROR "${variable} (${${variable}}) should be a relative path, but is absolute.")
endif()
endforeach()
foreach(variable ${absolute_path_vars})
if(NOT IS_ABSOLUTE ${${variable}})
message(SEND_ERROR "${variable} (${${variable}}) should be an absolute path, but is relative.")
endif()
endforeach()
add_executable(dummy main.c)
set_target_properties(dummy PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|