Make the ubuntu themed panel icons optional, and default it to off unless compiling on Ubuntu. Fixes issue #1076

This commit is contained in:
David Sansome 2010-12-18 20:07:29 +00:00
parent 75fad2ff60
commit 515167506f
1 changed files with 22 additions and 7 deletions

29
dist/CMakeLists.txt vendored
View File

@ -11,6 +11,19 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi.in
${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi @ONLY)
# windows/windres.rc is done by src/CMakeLists.txt
if(EXISTS /etc/lsb-release)
file(READ "/etc/lsb-release" LSB_RELEASE_CONTENTS)
string(REGEX MATCH "DISTRIB_ID=Ubuntu" IS_UBUNTU ${LSB_RELEASE_CONTENTS})
if(IS_UBUNTU)
set(INSTALL_UBUNTU_ICONS_DEFAULT ON)
else(IS_UBUNTU)
set(INSTALL_UBUNTU_ICONS_DEFAULT OFF)
endif(IS_UBUNTU)
else(EXISTS /etc/lsb-release)
set(INSTALL_UBUNTU_ICONS_DEFAULT OFF)
endif(EXISTS /etc/lsb-release)
option(INSTALL_UBUNTU_ICONS "Install the Ubuntu themed monochrome panel icons" ${INSTALL_UBUNTU_ICONS_DEFAULT})
if (NOT APPLE)
install(FILES clementine_64.png
@ -27,11 +40,13 @@ if (NOT APPLE)
DESTINATION share/applications
)
foreach(icon clementine-panel.png clementine-panel-grey.png)
foreach(theme ubuntu-mono-dark ubuntu-mono-light)
install(FILES icons/${theme}/${icon}
DESTINATION share/icons/${theme}/apps/24/
)
endforeach(theme)
endforeach(icon)
if(INSTALL_UBUNTU_ICONS)
foreach(icon clementine-panel.png clementine-panel-grey.png)
foreach(theme ubuntu-mono-dark ubuntu-mono-light)
install(FILES icons/${theme}/${icon}
DESTINATION share/icons/${theme}/apps/24/
)
endforeach(theme)
endforeach(icon)
endif(INSTALL_UBUNTU_ICONS)
endif (NOT APPLE)