added icon and disabled console window for release builds
This commit is contained in:
parent
0761bb86db
commit
506a937988
|
@ -1 +1,17 @@
|
|||
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)
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -5,8 +5,16 @@ include_directories(
|
|||
|
||||
add_subdirectory(core)
|
||||
|
||||
QT4_ADD_RESOURCES(snorenotify_DEPS ${SNORE_RCS})
|
||||
automoc4_add_executable( snorenotify main.cpp trayicon.cpp ${snorenotify_DEPS})
|
||||
QT4_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS})
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${SNORENOTIFY_RCS})
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue