added icon and disabled console window for release builds

This commit is contained in:
Patrick von Reth 2010-11-30 14:01:24 +01:00
parent 0761bb86db
commit 506a937988
3 changed files with 27 additions and 3 deletions

View File

@ -1 +1,17 @@
set(SNORE_RCS ${SNORE_RCS} ../data/snore.qrc PARENT_SCOPE) set(SNORE_RCS ${SNORE_RCS} ../data/snore.qrc PARENT_SCOPE)
if(WIN32)
if(MINGW)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zzz.rc "IDI_ICON1 ICON DISCARDABLE \"zzz.ico\"\n")
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"
"--include-dir=${CMAKE_CURRENT_SOURCE_DIR}")
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/zzz.o PARENT_SCOPE)
endif(WINDRES_EXECUTABLE)
else(MINGW)
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ../data/zzz.rc PARENT_SCOPE)
endif(MINGW)
endif(WIN32)

BIN
data/zzz.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -5,10 +5,18 @@ include_directories(
add_subdirectory(core) add_subdirectory(core)
QT4_ADD_RESOURCES(snorenotify_DEPS ${SNORE_RCS}) QT4_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS})
automoc4_add_executable( snorenotify main.cpp trayicon.cpp ${snorenotify_DEPS}) set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${SNORENOTIFY_RCS})
target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} ) if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
set(WIN32_SPECIFIC)
else(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
set(WIN32_SPECIFIC WIN32)
endif(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
automoc4_add_executable( snorenotify ${WIN32_SPECIFIC} main.cpp trayicon.cpp ${SNORENOTIFY_DEPS})
target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} )
add_dependencies(snorenotify snorecore) add_dependencies(snorenotify snorecore)
install(TARGETS snorenotify RUNTIME DESTINATION bin install(TARGETS snorenotify RUNTIME DESTINATION bin