2010-10-24 18:13:58 +00:00
|
|
|
set(SNORE_RCS ${SNORE_RCS} ../data/snore.qrc PARENT_SCOPE)
|
2010-11-30 13:01:24 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
2010-12-22 09:53:36 +00:00
|
|
|
set(ICON_NAME zzz)
|
|
|
|
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${ICON_NAME}.ico ICON)
|
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"\n")
|
2010-11-30 13:01:24 +00:00
|
|
|
if(MINGW)
|
|
|
|
find_program(WINDRES_EXECUTABLE NAMES windres)
|
|
|
|
if(WINDRES_EXECUTABLE)
|
|
|
|
exec_program(windres
|
2010-12-22 09:53:36 +00:00
|
|
|
ARGS "-i ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc"
|
|
|
|
"-o ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.o"
|
2010-11-30 13:01:24 +00:00
|
|
|
"--include-dir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2010-12-22 09:53:36 +00:00
|
|
|
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.o PARENT_SCOPE)
|
2010-11-30 13:01:24 +00:00
|
|
|
endif(WINDRES_EXECUTABLE)
|
|
|
|
else(MINGW)
|
2010-12-22 09:53:36 +00:00
|
|
|
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc PARENT_SCOPE)
|
2010-11-30 13:01:24 +00:00
|
|
|
endif(MINGW)
|
|
|
|
endif(WIN32)
|