summaryrefslogtreecommitdiffstats
path: root/testing/awesome/cmake.patch
blob: c2762374ed65a8399ab289033e90b4473ca88925 (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
commit 8b6adbffead83c9d77c493174d0f5b6a97f2a9e9
Author: Thomas Moschny <thomas.moschny@gmx.de>
Date:   Mon Feb 21 17:58:04 2011 +0100

    Normalize icon path names (fixes #869).
    
    The elements in ${icon_sources}, as returned by file(GLOB ...) contain
    double slashes, could be a bug in cmake. This causes building with
    cmake 2.8.4 to fail, due to dependency problems lateron.
    
    This patch works around the issue by normalizing all path names in
    ${icon_sources} while appending them to ${ALL_ICONS}, thereby removing
    the double slashes.
    
    Signed-off-by: Uli Schlachter <psychon@znc.in>

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64be9b9..472bec2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -244,14 +244,15 @@ endif()
 
 # {{{ Theme icons
 file(GLOB icon_sources RELATIVE ${SOURCE_DIR} ${SOURCE_DIR}/themes/*/titlebar/*.png)
-set(ALL_ICONS ${icon_sources})
 
 foreach(icon ${icon_sources})
     # Copy all icons to the build dir to simplify the following code.
     # Source paths are interpreted relative to ${SOURCE_DIR}, target paths
     # relative to ${BUILD_DIR}.
     get_filename_component(icon_path ${icon} PATH)
+    get_filename_component(icon_name ${icon} NAME)
     file(COPY ${icon} DESTINATION ${icon_path})
+    set(ALL_ICONS ${ALL_ICONS} "${icon_path}/${icon_name}")
 endforeach()
 
 macro(a_icon_convert match replacement input)