From 088a54c255d02f1953c44be38699e6ee0d2a287e Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Mon, 11 Aug 2014 17:17:56 +0200 Subject: [PATCH] cleanedup options --- CMakeLists.txt | 3 +- src/plugins/backends/growl/CMakeLists.txt | 40 +++++++++++------------ 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bccb3ca..91d22fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/plugins/backends/growl/CMakeLists.txt b/src/plugins/backends/growl/CMakeLists.txt index 675ebe5..0954f75 100644 --- a/src/plugins/backends/growl/CMakeLists.txt +++ b/src/plugins/backends/growl/CMakeLists.txt @@ -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() +