4
cmake_minimum_required(VERSION 2.6.2)
6
set(KDE_MIN_VERSION "4.3.0")
7
#atm this gets us FindQt4 and FindX11 (provided that the default cmake FindQt4 doesn't get used)
8
find_package(KDE4 ${KDE_MIN_VERSION} REQUIRED)
9
find_package(KdepimLibs REQUIRED)
10
find_package(PkgConfig REQUIRED)
13
include(CheckIncludeFile)
14
include(CMakeDependentOption)
16
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
18
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
19
if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debugfull)
20
add_definitions (-DQT_STRICT_ITERATORS)
23
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES})
25
#check for KDE greater than 4.3.80 (used for KStatusNotifier)
26
macro_ensure_version("4.3.80" ${KDE_VERSION} HAVEKDE4_4)
28
#check for KDE greater than 4.4.3 (usable version of KIdleTime)
29
macro_ensure_version("4.4.3" ${KDE_VERSION} HAVEKDE4_4_3)
32
option(USE_KIDLETIME "Use KIdleTime for user inactivity detection." ON)
35
if (HAVEKDE4_4_3 AND USE_KIDLETIME)
36
macro_bool_to_01(USE_KIDLETIME HAVE_KIDLETIME)
37
#only log the status of the feature if the user wants to build with KIdleTime support
38
macro_log_feature(HAVE_KIDLETIME "KIdleTime" "KDE Idle Time" "http://www.kde.org/" FALSE "" "KIdleTime based user inactivity detection for the auto-away functionality")
39
endif (HAVEKDE4_4_3 AND USE_KIDLETIME)
41
#looks like the original test is from Kopete, their port doesn't use Xext so neither shall ours
42
if (Q_WS_X11 AND NOT HAVE_KIDLETIME)
43
macro_bool_to_01(X11_Xscreensaver_FOUND HAVE_XSCREENSAVER)
44
macro_log_feature(HAVE_XSCREENSAVER "libXss" "X ScreenSaver Library" "http://www.x.org/" FALSE "" "Screensaver detection support for the auto-away functionality")
46
macro_bool_to_01(X11_FOUND HAVE_X11)
47
macro_log_feature(HAVE_X11 "libx11" "X Window System Client Library" "http://www.x.org/" FALSE "" "User inactivity detection support for the auto-away functionality")
49
macro_bool_to_01(X11_Xutil_FOUND HAVE_XUTIL)
50
macro_log_feature(HAVE_XUTIL "X11 Xutil.h header" "X11 Xutil header" "http://www.x.org/" FALSE "" "User inactivity detection support for the auto-away functionality")
51
endif (Q_WS_X11 AND NOT HAVE_KIDLETIME)
53
macro_optional_find_package(QCA2)
54
macro_bool_to_01(QCA2_FOUND HAVE_QCA2)
55
macro_log_feature(QCA2_FOUND "QCA" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Required for using encryption in IRC")
57
pkg_check_modules(INDICATEQT indicate-qt>=0.2.2)
58
macro_bool_to_01(INDICATEQT_FOUND HAVE_INDICATEQT)
59
macro_log_feature(INDICATEQT_FOUND "libindicate-qt" "Qt binding for libindicate" "http://launchpad.net/libindicate-qt" FALSE "" "Support for message indicator")
61
#define the value for HAVE_KSTATUSNOTIFIERITEM
62
macro_bool_to_01(HAVEKDE4_4 HAVE_KSTATUSNOTIFIERITEM)
64
check_include_file("stropts.h" HAVE_STROPTS_H)
65
check_include_file("byteswap.h" HAVE_BYTESWAP_H)
66
check_include_file("sys/endian.h" HAVE_SYS_ENDIAN_H)
68
configure_file(config-konversation.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konversation.h )
71
add_subdirectory(data)
73
macro_display_feature_log()
74
find_package(Msgfmt REQUIRED)
75
find_package(Gettext REQUIRED)
76
add_subdirectory( po )
77
add_subdirectory( doc-translations )
78
add_subdirectory( doc )