summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 621d39c3c19a73605d6adb9832927cc67b2abb47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

cmake_minimum_required( VERSION 2.8 )


##### general package setup #####################

project( kdenetwork )

set( PACKAGE kdenetwork )
set( VERSION "3.5.13" )


##### include essential cmake modules ###########

include( FindPkgConfig )
include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )


##### include our cmake modules #################

set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )


##### setup install paths #######################

include( TDESetupPaths )
tde_setup_paths( )


##### optional stuff ############################

option( WITH_JINGLE "Enable jingle support (kopete)" OFF )
option( WITH_SPEEX "Enable speex support (for jingle)" OFF )
option( WITH_WEBCAM "Enable webcam support (kopete/msn)" OFF )
option( WITH_GSM "Enable GSM SMS support (kopete/sms)" OFF )


##### kopete protocols ##########################

option( BUILD_KOPETE_PROTOCOL_ALL "Build all kopete protocols" OFF )
option( BUILD_KOPETE_PROTOCOL_TESTBED "Build kopete protocol testbed" ${BUILD_KOPETE_PROTOCOL_ALL} )
option( BUILD_KOPETE_PROTOCOL_GROUPWISE "Build kopete protocol groupwise" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_MSN "Build kopete protocol msn" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_IRC "Build kopete protocol irc" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_OSCAR "Build kopete protocol oscar" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_YAHOO "Build kopete protocol yahoo" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_WINPOPUP "Build kopete protocol winpopup" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_SMS "Build kopete protocol sms" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_JABBER "Build kopete protocol jabber" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_GADU "Build kopete protocol gadu" ${BUILD_KOPETE_PROTOCOL_ALL}  )
option( BUILD_KOPETE_PROTOCOL_MEANWHILE "Build kopete protocol meanwhile" ${BUILD_KOPETE_PROTOCOL_ALL}  )


##### kopete plugins ############################

option( BUILD_KOPETE_PLUGIN_ALL "Build all kopete plugins" OFF )
option( BUILD_KOPETE_PLUGIN_LATEX "Build latex kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_AUTOREPLACE "Build autoreplace kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_HISTORY "Build history kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_CONTACTNOTES "Build contactnotes kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_CRYPTOGRAPHY "Build cryptography kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_CONNECTIONSTATUS "Build connectionstatus kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_TRANSLATOR "Build translator kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_NOWLISTENING "Build nowlistening kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_WEBPRESENCE "Build webpresence kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_TEXTEFFECT "Build texteffect kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_HIGHLIGHT "Build highlight kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_ALIAS "Build alias kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_MOTIONAUTOAWAY "Build motionautoaway kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_NETMEETING "Build netmeeting kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_ADDBOOKMARKS "Build addbookmarks kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_STATISTICS "Build statistics kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )
option( BUILD_KOPETE_PLUGIN_SMPPPDCS "Build smpppdcs kopete plugin" ${BUILD_KOPETE_PLUGIN_ALL} )


##### user requested modules ####################

option( BUILD_ALL "Build all" OFF )
option( BUILD_DCOPRSS "Build dcoprss" ${BUILD_ALL} )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_FILESHARING "Build filesharing" ${BUILD_ALL} )
option( BUILD_KDICT "Build kdict" ${BUILD_ALL} )
option( BUILD_KDNSSD "Build kdnssd" ${BUILD_ALL} )
option( BUILD_KFILE_PLUGINS "Build kfile-plugins" ${BUILD_ALL} )
option( BUILD_KGET "Build kget" ${BUILD_ALL} )
option( BUILD_KNEWSTICKER "Build knewsticker" ${BUILD_ALL} )
option( BUILD_KOPETE "Build kopete" ${BUILD_ALL} )
option( BUILD_KPF "Build kpf" ${BUILD_ALL} )
option( BUILD_KPPP "Build kppp" ${BUILD_ALL} )
option( BUILD_LIBRSS "Build librss" ${BUILD_ALL} )


##### configure checks ##########################

include( ConfigureChecks.cmake )


###### global compiler settings #################

add_definitions(
  -DHAVE_CONFIG_H
)

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )


##### kdenetwork directories ####################

tde_conditional_add_subdirectory( BUILD_DCOPRSS dcoprss )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_FILESHARING filesharing )
tde_conditional_add_subdirectory( BUILD_KDICT kdict )
tde_conditional_add_subdirectory( BUILD_KDNSSD kdnssd )
tde_conditional_add_subdirectory( BUILD_KFILE_PLUGINS kfile-plugins )
tde_conditional_add_subdirectory( BUILD_KGET kget )
tde_conditional_add_subdirectory( BUILD_KNEWSTICKER knewsticker )
tde_conditional_add_subdirectory( BUILD_KOPETE kopete )
tde_conditional_add_subdirectory( BUILD_KPF kpf )
tde_conditional_add_subdirectory( BUILD_KPPP kppp )
tde_conditional_add_subdirectory( BUILD_LIBRSS librss )


##### write configure files #####################

configure_file( config.h.cmake config.h @ONLY )