aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spendrin <ps_ml@gmx.de>2007-11-13 21:04:31 +0000
committerPatrick Spendrin <ps_ml@gmx.de>2007-11-13 21:04:31 +0000
commit2bd0cad2d89e6b57ba83c606529c5750a4c19198 (patch)
treedf7aa321662fe68bf388694897a024e5138d47c5
parent047a232448474658f46ad5f46d81935455fb517e (diff)
downloadextra-cmake-modules-2bd0cad2d89e6b57ba83c606529c5750a4c19198.tar.gz
extra-cmake-modules-2bd0cad2d89e6b57ba83c606529c5750a4c19198.tar.bz2
changing kde4_add_win32_icon acc. to the hints of alex neundorf.
CCMAIL: neundorf@kde.org svn path=/trunk/KDE/kdelibs/; revision=736285
-rw-r--r--modules/KDE4Macros.cmake20
1 files changed, 8 insertions, 12 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 41bfab0d..b8d90a7c 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -941,28 +941,24 @@ endmacro (KDE4_CREATE_HTML_HANDBOOK)
# adds application icon to target source list
-#'appname' - an application name
# 'appsources' - the sources of the application
# 'pngfiles' - specifies the list of icon files
-# example: KDE4_ADD_WIN32_APP_ICON(myapp "pics/cr16-myapp.png;pics/cr32-myapp.png")
+# example: KDE4_ADD_WIN32_APP_ICON(myapp_SRCS "pics/cr16-myapp.png;pics/cr32-myapp.png")
-macro (KDE4_ADD_WIN32_APP_ICON appname appsources pngfiles)
+macro (KDE4_ADD_WIN32_APP_ICON appsources)
if (WIN32)
- if (NOT PNG2ICO_EXECUTABLE)
- find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
- endif (NOT PNG2ICO_EXECUTABLE)
- if (NOT WINDRES_EXECUTABLE)
- find_program(WINDRES_EXECUTABLE NAMES windres)
- endif (NOT WINDRES_EXECUTABLE)
+ find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
+ find_program(WINDRES_EXECUTABLE NAMES windres)
if(MSVC)
- set(WINDRES_EXECUTABLE true)
+ set(WINDRES_EXECUTABLE TRUE)
endif(MSVC)
+ STRING(REPLACE _SRCS "" appname ${appsources})
if (PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appname})
# png2ico is found by the above find_program
- message("png2ico ${_outfilename}.ico ${pngfiles}")
- exec_program(png2ico ARGS ${_outfilename}.ico ${pngfiles})
+# message("png2ico ${_outfilename}.ico ${ARGN}")
+ exec_program(png2ico ARGS ${_outfilename}.ico ${ARGN})
# now make rc file for adding it to the sources
file(WRITE ${_outfilename}.rc "IDI_ICON1 ICON DISCARDABLE \"${_outfilename}.ico\"\n")