improved rc stuff
This commit is contained in:
parent
69828392a3
commit
7000c85efe
|
@ -1,17 +1,19 @@
|
|||
set(SNORE_RCS ${SNORE_RCS} ../data/snore.qrc PARENT_SCOPE)
|
||||
|
||||
if(WIN32)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zzz.rc "IDI_ICON1 ICON DISCARDABLE \"zzz.ico\"\n")
|
||||
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")
|
||||
if(MINGW)
|
||||
find_program(WINDRES_EXECUTABLE NAMES windres)
|
||||
if(WINDRES_EXECUTABLE)
|
||||
exec_program(windres
|
||||
ARGS "-i ${CMAKE_CURRENT_BINARY_DIR}/zzz.rc"
|
||||
"-o ${CMAKE_CURRENT_BINARY_DIR}/zzz.o"
|
||||
ARGS "-i ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc"
|
||||
"-o ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.o"
|
||||
"--include-dir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/zzz.o PARENT_SCOPE)
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.o PARENT_SCOPE)
|
||||
endif(WINDRES_EXECUTABLE)
|
||||
else(MINGW)
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/zzz.rc PARENT_SCOPE)
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc PARENT_SCOPE)
|
||||
endif(MINGW)
|
||||
endif(WIN32)
|
Loading…
Reference in New Issue