make snore deamon optional
This commit is contained in:
parent
aa8b67c8a8
commit
f96c882ea2
|
@ -9,6 +9,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||
#######################################################################
|
||||
option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF)
|
||||
option(WITH_GROWL_BACKEND "Build the Growl backend" ON)
|
||||
option(WITH_SNORE_DEAMON "Build the Snore deamon, which redirects notifications" OFF)
|
||||
#######################################################################
|
||||
|
||||
set(SNORE_VERSION_MAJOR 0)
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
set(SNORE_RCS ${SNORE_RCS} ../data/snore.qrc PARENT_SCOPE)
|
||||
set(SNORE_RCS ${SNORE_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/../data/snore.qrc PARENT_SCOPE)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
set(ICON_NAME zzz)
|
||||
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${ICON_NAME}.ico ICON)
|
||||
string(REPLACE "\\" "\\\\" ICON ${ICON})
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"\n")
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc PARENT_SCOPE)
|
||||
endif(WIN32)
|
||||
if(WITH_SNORE_DEAMON)
|
||||
if(WIN32)
|
||||
set(ICON_NAME zzz)
|
||||
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${ICON_NAME}.ico ICON)
|
||||
string(REPLACE "\\" "\\\\" ICON ${ICON})
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"\n")
|
||||
set(SNORENOTIFY_DEAMON_DEPS ${SNORENOTIFY_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/${ICON_NAME}.rc PARENT_SCOPE)
|
||||
endif(WIN32)
|
||||
|
||||
if(KDE4_FOUND)
|
||||
install(FILES snore.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps)
|
||||
if(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
install(FILES snore.png DESTINATION /usr/share/pixmaps)
|
||||
endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
endif(KDE4_FOUND)
|
||||
if(KDE4_FOUND)
|
||||
install(FILES snore.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps)
|
||||
if(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
install(FILES snore.png DESTINATION /usr/share/pixmaps)
|
||||
endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
endif(KDE4_FOUND)
|
||||
endif()
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_subdirectory(core)
|
||||
|
||||
QT4_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS})
|
||||
set(SNORENOTIFY_DEPS ${SNORENOTIFY_DEPS} ${SNORENOTIFY_RCS})
|
||||
if(WITH_SNORE_DEAMON)
|
||||
|
||||
add_executable( snorenotify WIN32 main.cpp snorenotify.cpp trayicon.cpp ${SNORENOTIFY_DEPS})
|
||||
add_executable( snorenotify WIN32 main.cpp snorenotify.cpp trayicon.cpp ${SNORENOTIFY_DEAMON_DEPS})
|
||||
|
||||
target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} )
|
||||
target_link_libraries( snorenotify snorecore ${QT_QTGUI_LIBRARY} )
|
||||
|
||||
if(KDE4_FOUND)
|
||||
target_link_libraries( snorenotify ${KDE4_KDEUI_LIBS} )
|
||||
endif(KDE4_FOUND)
|
||||
if(KDE4_FOUND)
|
||||
target_link_libraries( snorenotify ${KDE4_KDEUI_LIBS} )
|
||||
endif(KDE4_FOUND)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(snorenotify PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"")
|
||||
endif(MSVC)
|
||||
if(MSVC)
|
||||
set_target_properties(snorenotify PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"")
|
||||
endif(MSVC)
|
||||
|
||||
add_dependencies(snorenotify snorecore)
|
||||
add_dependencies(snorenotify snorecore)
|
||||
|
||||
install(TARGETS snorenotify RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
install(TARGETS snorenotify RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
endif()
|
||||
|
||||
add_subdirectory(plugins)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
include(GetGitRevisionDescription)
|
||||
|
||||
|
@ -7,6 +7,8 @@ get_git_head_revision(GIT_REFSPEC SNORE_REVISION)
|
|||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/version.cpp")
|
||||
|
||||
QT4_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS})
|
||||
|
||||
add_subdirectory(notification)
|
||||
add_subdirectory(plugins)
|
||||
|
||||
|
@ -15,6 +17,7 @@ set ( SnoreNotify_SRCS ${SnoreNotify_SRCS}
|
|||
application.cpp
|
||||
hint.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||
${SNORENOTIFY_RCS}
|
||||
)
|
||||
|
||||
set ( SnoreNotify_HDR ${SnoreNotify_HDR}
|
||||
|
|
Loading…
Reference in New Issue