summaryrefslogtreecommitdiff
path: root/src/plugins/CMakeLists.txt
blob: 0b4eae29f87211a31e3f70aa58f305495e6ef7b6 (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
# Copyright (c) 2003-2009 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

SET(LIB_PLUGINS_SRC
weechat-plugin.h
plugin.c plugin.h
plugin-api.c plugin-api.h
plugin-config.h plugin-config.c)

INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_plugins STATIC ${LIB_PLUGINS_SRC})

INCLUDE(CheckIncludeFiles)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists)

IF(NOT DISABLE_ALIAS)
  ADD_SUBDIRECTORY( alias )
ENDIF(NOT DISABLE_ALIAS)

IF(NOT DISABLE_ASPELL)
  # Check for aspell libraries
  FIND_PACKAGE(Aspell)
  IF(ASPELL_FOUND)
    ADD_SUBDIRECTORY( aspell )
  ENDIF(ASPELL_FOUND)
ENDIF(NOT DISABLE_ASPELL)

IF(NOT DISABLE_CHARSET)
  # Check for iconv support.
  IF(ICONV_FOUND)
    ADD_SUBDIRECTORY( charset )
  ENDIF(ICONV_FOUND)
ENDIF(NOT DISABLE_CHARSET)

IF(ENABLE_DEMO)
  ADD_SUBDIRECTORY( demo )
ENDIF(ENABLE_DEMO)

IF(NOT DISABLE_FIFO)
  ADD_SUBDIRECTORY( fifo )
ENDIF(NOT DISABLE_FIFO)

IF(NOT DISABLE_IRC)
  ADD_SUBDIRECTORY( irc )
ENDIF(NOT DISABLE_IRC)

IF(NOT DISABLE_JABBER)
  # Check for iksemel library
  FIND_PACKAGE(Iksemel)
  IF(IKSEMEL_FOUND)
    ADD_SUBDIRECTORY( jabber )
  ENDIF(IKSEMEL_FOUND)
ENDIF(NOT DISABLE_JABBER)

IF(NOT DISABLE_LOGGER)
  ADD_SUBDIRECTORY( logger )
ENDIF(NOT DISABLE_LOGGER)

IF(NOT DISABLE_NOTIFY)
  ADD_SUBDIRECTORY( notify )
ENDIF(NOT DISABLE_NOTIFY)

IF(NOT DISABLE_RELAY)
  ADD_SUBDIRECTORY( relay )
ENDIF(NOT DISABLE_RELAY)

IF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DISABLE_RUBY AND NOT DISABLE_LUA AND NOT DISABLE_TCL)
  ADD_SUBDIRECTORY( scripts )
ENDIF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DISABLE_RUBY AND NOT DISABLE_LUA AND NOT DISABLE_TCL)

IF(ENABLE_TRIGGER)
  ADD_SUBDIRECTORY( trigger )
ENDIF(ENABLE_TRIGGER)

IF(NOT DISABLE_XFER)
  ADD_SUBDIRECTORY( xfer )
ENDIF(NOT DISABLE_XFER)