cleanedup options

This commit is contained in:
Patrick von Reth 2014-08-11 17:17:56 +02:00
parent 4e10c7864e
commit 088a54c255
2 changed files with 20 additions and 23 deletions

View File

@ -8,7 +8,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
cmake_policy(SET CMP0020 NEW)
include(GNUInstallDirs)
include(CMakeDependentOption)
include(GenerateExportHeader)
@ -18,7 +17,7 @@ option(WITH_GROWL_BACKEND "Build the Growl backend" ON)
option(WITH_SNORE_DEAMON "Build the Snore deamon, which redirects notifications" OFF)
option(WITH_QT4 "Use Qt4" ON)
option(WITH_KDE "Try to build with KDE support if available" ON)
cmake_dependent_option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF "WITH_SNORE_DEAMON" ON)
option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF)
#######################################################################
set(SNORE_VERSION_MAJOR 0)

View File

@ -1,27 +1,25 @@
if( WITH_GROWL_BACKEND )
if(EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/)
message( STATUS "Adding libgrowl backend" )
if(EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/)
message( STATUS "Adding libgrowl backend" )
find_package(Threads REQUIRED)
include_directories(${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/include)
find_package(Threads REQUIRED)
include_directories(${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/include)
set( GROWL_SRC growlbackend.cpp
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/tcp.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/md5.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/growl.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/growl.cpp)
set( GROWL_SRC growlbackend.cpp
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/tcp.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/md5.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/growl.c
${CMAKE_SOURCE_DIR}/thirdparty/gntp-send/src/growl.cpp)
add_library(libsnore_backend_growl MODULE ${GROWL_SRC} )
target_link_libraries(libsnore_backend_growl libsnore ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(libsnore_backend_growl PROPERTIES COMPILE_FLAGS "-DGROWL_DLL -DGROWL_CPP_DLL" )
add_library(libsnore_backend_growl MODULE ${GROWL_SRC} )
target_link_libraries(libsnore_backend_growl libsnore ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(libsnore_backend_growl PROPERTIES COMPILE_FLAGS "-DGROWL_DLL -DGROWL_CPP_DLL" )
if( WIN32 )
target_link_libraries(libsnore_backend_growl ws2_32 )
endif()
install(TARGETS libsnore_backend_growl ${SNORE_PLUGIN_INSTALL_PATH})
else()
message( WARNING "To build the Growl Backend please checkout the submodule" )
if( WIN32 )
target_link_libraries(libsnore_backend_growl ws2_32 )
endif()
endif( WITH_GROWL_BACKEND )
install(TARGETS libsnore_backend_growl ${SNORE_PLUGIN_INSTALL_PATH})
else()
message( WARNING "To build the Growl Backend please checkout the submodule" )
endif()