generic: rewrite cmake file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2015-10-29 11:24:56 +02:00
parent 9f338a3eee
commit 181830410a

View file

@ -1,31 +1,30 @@
project(ariya-icons NONE)
cmake_minimum_required(VERSION 2.6)
# include specific modules
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" )
set(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" )
set(ARIYA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/icons/ariya")
########### install files ###############
set( icon_dirs 8x8 16x16 22x22 32x32 48x48 64x64 128x128 )
set(icon_dirs 8x8 16x16 22x22 32x32 48x48 64x64 128x128)
set(ARIYA_INSTALL_DIR ${ICON_INSTALL_DIR}/ariya)
install( DIRECTORY ${icon_dirs} DESTINATION ${ARIYA_INSTALL_DIR} PATTERN .git EXCLUDE PATTERN "*.sh" EXCLUDE )
install( FILES index.theme DESTINATION ${ARIYA_INSTALL_DIR})
install(
DIRECTORY ${icon_dirs}
DESTINATION ${ARIYA_INSTALL_DIR}
PATTERN ".git" EXCLUDE
PATTERN "*.sh" EXCLUDE
)
install(FILES index.theme DESTINATION ${ARIYA_INSTALL_DIR})
macro (COPY_ICONS _srcdir _srcfile _destdir)
macro(COPY_ICONS _srcdir _srcfile _destdir)
set(_src "${_srcdir}/${_srcfile}")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_src}")
foreach(_dest ${ARGN})
install( FILES "${_src}" DESTINATION ${_destdir}/${_srcdir} RENAME "${_dest}" )
install(
FILES "${_src}"
DESTINATION ${_destdir}/${_srcdir}
RENAME "${_dest}"
)
endforeach()
endif()
endmacro (COPY_ICONS)
# Copy the msoffice icon to the msoffice-2007 mimetypes (#225507)
foreach(_sizedir ${icon_dirs})
endforeach()
endmacro()