2014-07-07 23:15:28 +00:00
project ( SnoreNotify )
cmake_minimum_required ( VERSION 2.8.9 )
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } ${ CMAKE_SOURCE_DIR } /cmake/modules ${ CMAKE_PREFIX_PATH } /share/apps/cmake/modules )
set ( CMAKE_AUTOMOC ON )
set ( CMAKE_INCLUDE_CURRENT_DIR ON )
cmake_policy ( SET CMP0020 NEW )
include ( GNUInstallDirs )
2014-08-11 15:15:39 +00:00
include ( GenerateExportHeader )
2014-08-22 11:59:59 +00:00
include ( FeatureSummary )
2014-07-07 23:15:28 +00:00
#######################################################################
option ( WITH_FRONTENDS "Build frontends currently only useful if WITH_SNORE_DEAMON=ON" OFF )
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 )
2014-08-11 15:17:56 +00:00
option ( WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF )
2014-07-07 23:15:28 +00:00
#######################################################################
set ( SNORE_VERSION_MAJOR 0 )
set ( SNORE_VERSION_MINOR 5 )
2014-07-18 09:42:45 +00:00
set ( SNORE_VERSION_PATCH 0 )
2014-08-24 09:34:26 +00:00
set ( SNORE_VERSION_SUFFIX "rc3" )
2014-07-07 23:15:28 +00:00
set ( SNORE_SUFFIX "" )
set ( SNORE_CamelCase_SUFFIX "" )
2014-08-11 15:15:39 +00:00
if ( WITH_QT4 )
find_package ( Qt4 REQUIRED )
2014-08-20 11:37:50 +00:00
include_directories ( ${ QT_INCLUDES } )
2014-08-20 11:48:16 +00:00
include ( NoKDE )
2014-07-07 23:15:28 +00:00
else ( )
2014-08-20 11:48:16 +00:00
find_package ( ECM 0.0.9 NO_MODULE REQUIRED )
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } ${ ECM_MODULE_PATH } )
include ( KDECompilerSettings )
2014-08-11 15:15:39 +00:00
find_package ( Qt5Core REQUIRED )
find_package ( Qt5Widgets REQUIRED )
find_package ( Qt5Network REQUIRED )
find_package ( Qt5DBus QUIET )
find_package ( Qt5Declarative REQUIRED )
include ( ECMQt4To5Porting )
set ( SNORE_SUFFIX "-qt5" )
set ( SNORE_CamelCase_SUFFIX "Qt5" )
endif ( )
2014-08-20 11:37:50 +00:00
2014-08-22 10:35:01 +00:00
2014-08-22 11:59:59 +00:00
find_package ( Doxygen QUIET )
set_package_properties ( Doxygen PROPERTIES
2014-08-22 12:10:06 +00:00
D E S C R I P T I O N " D o x y g e n i s t h e d e f a c t o s t a n d a r d t o o l f o r g e n e r a t i n g d o c u m e n t a t i o n f r o m a n n o t a t e d C + + s o u r c e s , b u t i t a l s o s u p p o r t s o t h e r p o p u l a r p r o g r a m m i n g l a n g u a g e s s u c h a s C , O b j e c t i v e - C , C #, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D."
U R L " h t t p : / / w w w . s t a c k . n l / ~ d i m i t r i / d o x y g e n / "
P U R P O S E " G e n e r a t i o n o f A P I d o c u m e n t a t i o n "
2014-08-22 11:59:59 +00:00
T Y P E O P T I O N A L )
2014-07-07 23:15:28 +00:00
if ( DOXYGEN_FOUND )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @only )
add_custom_target ( doc
$ { D O X Y G E N _ E X E C U T A B L E } $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / D o x y f i l e
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ B I N A R Y _ D I R }
C O M M E N T " G e n e r a t i n g A P I d o c u m e n t a t i o n w i t h D o x y g e n " V E R B A T I M
)
endif ( DOXYGEN_FOUND )
set ( LIBSNORE_PLUGIN_PATH ${ CMAKE_INSTALL_LIBDIR } /libsnore ${ SNORE_SUFFIX } )
set ( LIBSNORE_FULL_PLUGIN_PATH ${ CMAKE_INSTALL_FULL_LIBDIR } /libsnore ${ SNORE_SUFFIX } )
set ( SNORE_PLUGIN_INSTALL_PATH LIBRARY DESTINATION ${ LIBSNORE_PLUGIN_PATH } )
add_definitions ( -DLIBSNORE_PLUGIN_PATH= "${LIBSNORE_FULL_PLUGIN_PATH}" -DSNORE_SUFFIX= "${SNORE_SUFFIX}" )
message ( STATUS "Installing plugins to ${LIBSNORE_PLUGIN_PATH}" )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } /bin )
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ CMAKE_BINARY_DIR } /bin )
2014-07-29 22:37:12 +00:00
2014-07-07 23:15:28 +00:00
add_subdirectory ( data )
add_subdirectory ( share )
add_subdirectory ( src )
2014-08-22 11:59:59 +00:00
feature_summary ( WHAT ALL )