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>
This commit is contained in:
parent
b87fc48230
commit
d2b684d4a3
|
@ -274,14 +274,15 @@ endif()
|
||||||
|
|
||||||
# {{{ Theme icons
|
# {{{ Theme icons
|
||||||
file(GLOB icon_sources RELATIVE ${SOURCE_DIR} ${SOURCE_DIR}/themes/*/titlebar/*.png)
|
file(GLOB icon_sources RELATIVE ${SOURCE_DIR} ${SOURCE_DIR}/themes/*/titlebar/*.png)
|
||||||
set(ALL_ICONS ${icon_sources})
|
|
||||||
|
|
||||||
foreach(icon ${icon_sources})
|
foreach(icon ${icon_sources})
|
||||||
# Copy all icons to the build dir to simplify the following code.
|
# Copy all icons to the build dir to simplify the following code.
|
||||||
# Source paths are interpreted relative to ${SOURCE_DIR}, target paths
|
# Source paths are interpreted relative to ${SOURCE_DIR}, target paths
|
||||||
# relative to ${BUILD_DIR}.
|
# relative to ${BUILD_DIR}.
|
||||||
get_filename_component(icon_path ${icon} PATH)
|
get_filename_component(icon_path ${icon} PATH)
|
||||||
|
get_filename_component(icon_name ${icon} NAME)
|
||||||
file(COPY ${icon} DESTINATION ${icon_path})
|
file(COPY ${icon} DESTINATION ${icon_path})
|
||||||
|
set(ALL_ICONS ${ALL_ICONS} "${icon_path}/${icon_name}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
macro(a_icon_convert match replacement input)
|
macro(a_icon_convert match replacement input)
|
||||||
|
|
Loading…
Reference in New Issue