diff options
Diffstat (limited to 'icons/CMakeLists.txt')
-rw-r--r-- | icons/CMakeLists.txt | 78 |
1 files changed, 1 insertions, 77 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 45a9718d..3065125c 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt | |||
@@ -4,88 +4,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) | |||
4 | include(ECMInstallIcons) | 4 | include(ECMInstallIcons) |
5 | include(KDEInstallDirs) | 5 | include(KDEInstallDirs) |
6 | 6 | ||
7 | function(copy_breeze_icons) | ||
8 | set(_multiValueArgs ICONS) | ||
9 | cmake_parse_arguments(ARG "" "" "${_multiValueArgs}" ${ARGN} ) | ||
10 | set(_BREEZEICONS_DIR ${CMAKE_CURRENT_BINARY_DIR}/breeze) | ||
11 | |||
12 | function(_copy_breeze_icon icon) | ||
13 | SET(paths "") | ||
14 | #breeze only ships svgs anyways | ||
15 | #change icons to * to also get icons-dark | ||
16 | file(GLOB_RECURSE paths ${_BREEZEICONS_DIR}/icons/*/*/${icon}.svg ) | ||
17 | |||
18 | #We cannot copy symlinks unless the target is there, so copy non-symlinks first | ||
19 | foreach(path ${paths}) | ||
20 | file(RELATIVE_PATH _rel_path ${_BREEZEICONS_DIR} ${path}) | ||
21 | set(_target_path ${CMAKE_CURRENT_SOURCE_DIR}/breeze/${_rel_path}) | ||
22 | get_filename_component(_target_dir ${_target_path} DIRECTORY) | ||
23 | if (NOT EXISTS ${_target_path} AND NOT IS_SYMLINK ${path}) | ||
24 | message("Copying icon ${path} to ${_target_dir}") | ||
25 | file(COPY ${path} DESTINATION ${_target_dir}) | ||
26 | endif() | ||
27 | endforeach() | ||
28 | #Now copy symlinks | ||
29 | foreach(path ${paths}) | ||
30 | file(RELATIVE_PATH _rel_path ${_BREEZEICONS_DIR} ${path}) | ||
31 | set(_target_path ${CMAKE_CURRENT_SOURCE_DIR}/breeze/${_rel_path}) | ||
32 | get_filename_component(_target_dir ${_target_path} DIRECTORY) | ||
33 | if (NOT EXISTS ${_target_path} AND IS_SYMLINK ${path}) | ||
34 | message("Copying icon symlink ${path} to ${_target_dir}") | ||
35 | file(COPY ${path} DESTINATION ${_target_dir}) | ||
36 | endif() | ||
37 | endforeach() | ||
38 | |||
39 | endfunction() | ||
40 | |||
41 | #Fetch the icons | ||
42 | if (NOT EXISTS ${_BREEZEICONS_DIR}) | ||
43 | message("Cloning into ${_BREEZEICONS_DIR}") | ||
44 | execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1 git://anongit.kde.org/breeze-icons.git ${_BREEZEICONS_DIR}) | ||
45 | endif() | ||
46 | |||
47 | #Copy the icons we want | ||
48 | foreach(_iconName ${ARG_ICONS}) | ||
49 | message (STATUS ${_iconName}) | ||
50 | _copy_breeze_icon(${_iconName}) | ||
51 | endforeach() | ||
52 | #Copy the license file | ||
53 | file(COPY ${_BREEZEICONS_DIR}/COPYING-ICONS DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/breeze/) | ||
54 | endfunction() | ||
55 | |||
56 | |||
57 | |||
58 | # Run this function if you want to updated the icons | ||
59 | # Warning: some icon names are symlinks and you'll thus need to copy the actual icon as well. If copying fails with some weird errors that's typically the problem | ||
60 | if (FALSE) | ||
61 | #file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/breeze/) | ||
62 | copy_breeze_icons(ICONS | ||
63 | application-menu | ||
64 | dialog-cancel | ||
65 | dialog-ok | ||
66 | document-decrypt | ||
67 | document-edit | ||
68 | document-encrypt | ||
69 | edit-delete | ||
70 | edit-find | ||
71 | edit-undo | ||
72 | error | ||
73 | folder | ||
74 | im-user | ||
75 | mail-mark-important | ||
76 | mail-mark-unread-new | ||
77 | mail-reply-sender | ||
78 | network-disconnect | ||
79 | view-refresh | ||
80 | ) | ||
81 | endif() | ||
82 | |||
83 | |||
84 | #Install kube icons | 7 | #Install kube icons |
85 | ecm_install_icons(ICONS sc-apps-kube_icon.svg 256-apps-kube_icon.png DESTINATION share/icons) | 8 | ecm_install_icons(ICONS sc-apps-kube_icon.svg 256-apps-kube_icon.png DESTINATION share/icons) |
86 | ecm_install_icons(ICONS sc-apps-kube_symbol.svg DESTINATION share/icons) | 9 | ecm_install_icons(ICONS sc-apps-kube_symbol.svg DESTINATION share/icons) |
87 | ecm_install_icons(ICONS sc-apps-kube_logo.svg DESTINATION share/icons) | 10 | ecm_install_icons(ICONS sc-apps-kube_logo.svg DESTINATION share/icons) |
88 | 11 | ||
12 | #See the copybreeze script to adjust icons and to copy them over | ||
89 | install(DIRECTORY | 13 | install(DIRECTORY |
90 | breeze/icons/places | 14 | breeze/icons/places |
91 | breeze/icons/actions | 15 | breeze/icons/actions |