summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-04-12 18:00:27 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-04-12 18:00:27 +0200
commit7618fdd240e32292b2202c76550c67f09ee0d90e (patch)
treefac0d0f452c6e6ead98db6ce107e36eeb5f95b09 /src
parent51d18c92e54b58c2a612ef765f7802226e62ba42 (diff)
downloadweechat-7618fdd240e32292b2202c76550c67f09ee0d90e.zip
core: use lower case for CMake keywords
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt117
-rw-r--r--src/core/CMakeLists.txt34
-rw-r--r--src/gui/CMakeLists.txt12
-rw-r--r--src/gui/curses/CMakeLists.txt75
-rw-r--r--src/plugins/CMakeLists.txt224
-rw-r--r--src/plugins/alias/CMakeLists.txt8
-rw-r--r--src/plugins/aspell/CMakeLists.txt26
-rw-r--r--src/plugins/charset/CMakeLists.txt22
-rw-r--r--src/plugins/exec/CMakeLists.txt8
-rw-r--r--src/plugins/fifo/CMakeLists.txt8
-rw-r--r--src/plugins/guile/CMakeLists.txt18
-rw-r--r--src/plugins/irc/CMakeLists.txt20
-rw-r--r--src/plugins/logger/CMakeLists.txt8
-rw-r--r--src/plugins/lua/CMakeLists.txt22
-rw-r--r--src/plugins/perl/CMakeLists.txt38
-rw-r--r--src/plugins/python/CMakeLists.txt16
-rw-r--r--src/plugins/relay/CMakeLists.txt22
-rw-r--r--src/plugins/ruby/CMakeLists.txt18
-rw-r--r--src/plugins/script/CMakeLists.txt14
-rw-r--r--src/plugins/tcl/CMakeLists.txt22
-rw-r--r--src/plugins/trigger/CMakeLists.txt8
-rw-r--r--src/plugins/xfer/CMakeLists.txt12
22 files changed, 374 insertions, 378 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a63e781ee..5a4a5a4d2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -22,93 +22,92 @@
if(COMMAND cmake_policy)
if(POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
- endif(POLICY CMP0003)
+ endif()
if(POLICY CMP0017)
cmake_policy(SET CMP0017 NEW)
- endif(POLICY CMP0017)
-endif(COMMAND cmake_policy)
+ endif()
+endif()
-ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+add_definitions(-DHAVE_CONFIG_H)
-INCLUDE(CheckIncludeFiles)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckSymbolExists)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckSymbolExists)
-CHECK_INCLUDE_FILES("langinfo.h" HAVE_LANGINFO_CODESET)
-CHECK_INCLUDE_FILES("sys/resource.h" HAVE_SYS_RESOURCE_H)
+check_include_files("langinfo.h" HAVE_LANGINFO_CODESET)
+check_include_files("sys/resource.h" HAVE_SYS_RESOURCE_H)
-CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)
+check_function_exists(mallinfo HAVE_MALLINFO)
-CHECK_SYMBOL_EXISTS("eat_newline_glitch" "term.h" HAVE_EAT_NEWLINE_GLITCH)
+check_symbol_exists("eat_newline_glitch" "term.h" HAVE_EAT_NEWLINE_GLITCH)
# weechat_gui_common MUST be the first lib in the list
-SET(STATIC_LIBS weechat_gui_common)
+set(STATIC_LIBS weechat_gui_common)
# Check for Large File Support
-IF(ENABLE_LARGEFILE)
- ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES)
-ENDIF(ENABLE_LARGEFILE)
+if(ENABLE_LARGEFILE)
+ add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES)
+endif()
# Check for Gettext
-IF(ENABLE_NLS)
- FIND_PACKAGE(Gettext)
- IF(GETTEXT_FOUND)
- ADD_DEFINITIONS(-DENABLE_NLS)
- ENDIF(GETTEXT_FOUND)
-ENDIF(ENABLE_NLS)
+if(ENABLE_NLS)
+ find_package(Gettext)
+ if(GETTEXT_FOUND)
+ add_definitions(-DENABLE_NLS)
+ endif()
+endif()
# Check for libgcrypt
-FIND_PACKAGE(GCRYPT REQUIRED)
-ADD_DEFINITIONS(-DHAVE_GCRYPT)
-LIST(APPEND EXTRA_LIBS ${GCRYPT_LDFLAGS})
+find_package(GCRYPT REQUIRED)
+add_definitions(-DHAVE_GCRYPT)
+list(APPEND EXTRA_LIBS ${GCRYPT_LDFLAGS})
# Check for GnuTLS
-IF(ENABLE_GNUTLS)
- FIND_PACKAGE(GnuTLS)
-
- IF(GNUTLS_FOUND)
- STRING(REGEX REPLACE "/[^/]*$" "" GNUTLS_LIBRARY_PATH "${GNUTLS_LIBRARY}")
- ADD_DEFINITIONS(-DHAVE_GNUTLS)
- INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
- SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${GNUTLS_LIBRARY_PATH}")
- LIST(APPEND EXTRA_LIBS gnutls)
- ENDIF(GNUTLS_FOUND)
-ENDIF(ENABLE_GNUTLS)
+if(ENABLE_GNUTLS)
+ find_package(GnuTLS)
+ if(GNUTLS_FOUND)
+ string(REGEX REPLACE "/[^/]*$" "" GNUTLS_LIBRARY_PATH "${GNUTLS_LIBRARY}")
+ add_definitions(-DHAVE_GNUTLS)
+ include_directories(${GNUTLS_INCLUDE_PATH})
+ set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${GNUTLS_LIBRARY_PATH}")
+ list(APPEND EXTRA_LIBS gnutls)
+ endif()
+endif()
# Check for zlib
-FIND_PACKAGE(ZLIB REQUIRED)
-ADD_DEFINITIONS(-DHAVE_ZLIB)
+find_package(ZLIB REQUIRED)
+add_definitions(-DHAVE_ZLIB)
# Check for iconv
-FIND_PACKAGE(Iconv)
-IF(ICONV_FOUND)
- ADD_DEFINITIONS( -DHAVE_ICONV )
-ENDIF(ICONV_FOUND)
+find_package(Iconv)
+if(ICONV_FOUND)
+ add_definitions( -DHAVE_ICONV )
+endif()
# Check for CURL
-FIND_PACKAGE(CURL REQUIRED)
+find_package(CURL REQUIRED)
-FIND_LIBRARY(DL_LIBRARY
+find_library(DL_LIBRARY
NAMES dl
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
)
-LIST(APPEND STATIC_LIBS weechat_plugins)
-IF(DL_LIBRARY)
- STRING(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
- SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
- LIST(APPEND EXTRA_LIBS dl)
-ENDIF(DL_LIBRARY)
-
-IF(COMMAND cmake_policy)
+list(APPEND STATIC_LIBS weechat_plugins)
+if(DL_LIBRARY)
+ string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
+ set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
+ list(APPEND EXTRA_LIBS dl)
+endif()
+
+if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 NEW)
- ADD_DEFINITIONS(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}")
-ELSE(COMMAND cmake_policy)
- ADD_DEFINITIONS(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"')
-ENDIF(COMMAND cmake_policy)
+ add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}")
+else()
+ add_definitions(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"')
+endif()
-ADD_SUBDIRECTORY( core )
-LIST(APPEND STATIC_LIBS weechat_core)
+add_subdirectory( core )
+list(APPEND STATIC_LIBS weechat_core)
-ADD_SUBDIRECTORY( plugins )
+add_subdirectory( plugins )
-ADD_SUBDIRECTORY( gui )
+add_subdirectory( gui )
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 1628a41af..ff2bc13b5 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -19,7 +19,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-SET(LIB_CORE_SRC
+set(LIB_CORE_SRC
weechat.c weechat.h
wee-backtrace.c wee-backtrace.h
wee-command.c wee-command.h
@@ -47,23 +47,23 @@ wee-util.c wee-util.h
wee-version.c wee-version.h)
# Check for flock support
-INCLUDE(CheckSymbolExists)
-CHECK_SYMBOL_EXISTS(flock "sys/file.h" HAVE_FLOCK)
+include(CheckSymbolExists)
+check_symbol_exists(flock "sys/file.h" HAVE_FLOCK)
-IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- FIND_LIBRARY(EXECINFO_LIB_PATH execinfo /usr/local/lib)
- SET(CMAKE_REQUIRED_LIBRARIES "${EXECINFO_LIB_PATH}")
- CHECK_FUNCTION_EXISTS(backtrace HAVE_BACKTRACE)
-ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- CHECK_SYMBOL_EXISTS(backtrace "execinfo.h" HAVE_BACKTRACE)
-ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ find_library(EXECINFO_LIB_PATH execinfo /usr/local/lib)
+ set(CMAKE_REQUIRED_LIBRARIES "${EXECINFO_LIB_PATH}")
+ check_function_exists(backtrace HAVE_BACKTRACE)
+else()
+ check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
+endif()
-IF(GNUTLS_FOUND)
- INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
-ENDIF(GNUTLS_FOUND)
+if(GNUTLS_FOUND)
+ include_directories(${GNUTLS_INCLUDE_PATH})
+endif()
-INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
+include_directories(${CURL_INCLUDE_DIRS})
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
-ADD_LIBRARY(weechat_core STATIC ${LIB_CORE_SRC})
-ADD_DEPENDENCIES(weechat_core version_git)
+include_directories(${CMAKE_BINARY_DIR})
+add_library(weechat_core STATIC ${LIB_CORE_SRC})
+add_dependencies(weechat_core version_git)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 22e4e84cf..12622224d 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -17,7 +17,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-SET(LIB_GUI_COMMON_SRC
+set(LIB_GUI_COMMON_SRC
gui-bar.c gui-bar.h
gui-bar-item.c gui-bar-item.h
gui-bar-window.c gui-bar-window.h
@@ -39,9 +39,9 @@ gui-mouse.c gui-mouse.h
gui-nicklist.c gui-nicklist.h
gui-window.c gui-window.h)
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
-ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
+include_directories(${CMAKE_BINARY_DIR})
+add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
-IF(ENABLE_NCURSES)
- SUBDIRS( curses )
-ENDIF(ENABLE_NCURSES)
+if(ENABLE_NCURSES)
+ subdirs( curses )
+endif()
diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt
index eaba7d481..61463d799 100644
--- a/src/gui/curses/CMakeLists.txt
+++ b/src/gui/curses/CMakeLists.txt
@@ -19,7 +19,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-SET(WEECHAT_CURSES_SRC
+set(WEECHAT_CURSES_SRC
gui-curses.h
gui-curses-bar-window.c
gui-curses-chat.c
@@ -30,60 +30,59 @@ gui-curses-mouse.c
gui-curses-term.c
gui-curses-window.c)
-SET(EXECUTABLE weechat)
+set(EXECUTABLE weechat)
-FIND_PACKAGE(Ncurses)
-IF(NCURSES_FOUND)
- CHECK_INCLUDE_FILES(ncursesw/ncurses.h NCURSESW_HEADERS)
- IF(NCURSESW_HEADERS)
- ADD_DEFINITIONS(-DHAVE_NCURSESW_CURSES_H)
- ELSE(NCURSESW_HEADERS)
- CHECK_INCLUDE_FILES(ncurses.h NCURSES_HEADERS)
- IF(NCURSES_HEADERS)
- ADD_DEFINITIONS(-DHAVE_NCURSES_H)
- ENDIF(NCURSES_HEADERS)
- ENDIF(NCURSESW_HEADERS)
+find_package(Ncurses)
+if(NCURSES_FOUND)
+ check_include_files(ncursesw/ncurses.h NCURSESW_HEADERS)
+ if(NCURSESW_HEADERS)
+ add_definitions(-DHAVE_NCURSESW_CURSES_H)
+ else()
+ check_include_files(ncurses.h NCURSES_HEADERS)
+ if(NCURSES_HEADERS)
+ add_definitions(-DHAVE_NCURSES_H)
+ endif()
+ endif()
+ list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
+endif()
- LIST(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
-ENDIF(NCURSES_FOUND)
+if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ if(HAVE_BACKTRACE)
+ list(APPEND EXTRA_LIBS "execinfo")
+ endif()
+endif()
-IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- IF(HAVE_BACKTRACE)
- LIST(APPEND EXTRA_LIBS "execinfo")
- ENDIF(HAVE_BACKTRACE)
-ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+ list(APPEND EXTRA_LIBS "socket" "nsl")
+endif()
-IF(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
- LIST(APPEND EXTRA_LIBS "socket" "nsl")
-ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+list(APPEND EXTRA_LIBS "pthread")
-LIST(APPEND EXTRA_LIBS "pthread")
+if(ICONV_LIBRARY)
+ list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
+endif()
-IF(ICONV_LIBRARY)
- LIST(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
-ENDIF(ICONV_LIBRARY)
+if(LIBINTL_LIBRARY)
+ list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
+endif()
-IF(LIBINTL_LIBRARY)
- LIST(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
-ENDIF(LIBINTL_LIBRARY)
+list(APPEND EXTRA_LIBS "m")
-LIST(APPEND EXTRA_LIBS "m")
+list(APPEND EXTRA_LIBS ${CURL_LIBRARIES})
-LIST(APPEND EXTRA_LIBS ${CURL_LIBRARIES})
+add_executable(${EXECUTABLE} ${WEECHAT_CURSES_SRC})
-ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_CURSES_SRC})
-
-INCLUDE_DIRECTORIES(.. ../../core ../../plugins ${NCURSES_INCLUDE_PATH})
+include_directories(.. ../../core ../../plugins ${NCURSES_INCLUDE_PATH})
# Because of a linker bug, we have to link 2 times with libweechat_core.a
-TARGET_LINK_LIBRARIES(${EXECUTABLE} ${STATIC_LIBS} ${EXTRA_LIBS} ${STATIC_LIBS})
+target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} ${EXTRA_LIBS} ${STATIC_LIBS})
-INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
+install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
# Create a symbolic link weechat-curses -> weechat
# This link is created for compatibility with old versions on /upgrade.
# It may be removed in future.
-INSTALL(CODE "
+install(CODE "
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E remove -f \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}\"
COMMAND ${CMAKE_COMMAND} -E create_symlink weechat${CMAKE_EXECUTABLE_SUFFIX} \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}\"
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 1e5587454..f35c7a3af 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -18,132 +18,132 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-SET(LIB_PLUGINS_SRC
+set(LIB_PLUGINS_SRC
weechat-plugin.h
plugin.c plugin.h
plugin-api.c plugin-api.h
plugin-config.h plugin-config.c)
-SET(LIB_PLUGINS_SCRIPTS_SRC
+set(LIB_PLUGINS_SCRIPTS_SRC
plugin-script.c plugin-script.h
plugin-script-api.c plugin-script-api.h
plugin-script-callback.c plugin-script-callback.h)
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
-ADD_LIBRARY(weechat_plugins STATIC ${LIB_PLUGINS_SRC})
+include_directories(${CMAKE_BINARY_DIR})
+add_library(weechat_plugins STATIC ${LIB_PLUGINS_SRC})
-ADD_DEFINITIONS(${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ADD_LIBRARY(weechat_plugins_scripts STATIC ${LIB_PLUGINS_SCRIPTS_SRC})
+add_definitions(${CMAKE_SHARED_LIBRARY_C_FLAGS})
+add_library(weechat_plugins_scripts STATIC ${LIB_PLUGINS_SCRIPTS_SRC})
-INCLUDE(CheckIncludeFiles)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckLibraryExists)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckLibraryExists)
-IF(ENABLE_ALIAS)
- ADD_SUBDIRECTORY( alias )
-ENDIF(ENABLE_ALIAS)
+if(ENABLE_ALIAS)
+ add_subdirectory( alias )
+endif()
-IF(ENABLE_ASPELL)
- IF(ENABLE_ENCHANT)
+if(ENABLE_ASPELL)
+ if(ENABLE_ENCHANT)
# Check for enchant libraries
- FIND_PACKAGE(ENCHANT)
- IF(ENCHANT_FOUND)
- ADD_SUBDIRECTORY( aspell )
- ELSE(ENCHANT_FOUND)
+ find_package(ENCHANT)
+ if(ENCHANT_FOUND)
+ add_subdirectory( aspell )
+ else()
# Check for aspell libraries
- FIND_PACKAGE(Aspell)
- IF(ASPELL_FOUND)
- ADD_SUBDIRECTORY( aspell )
- ENDIF(ASPELL_FOUND)
- ENDIF(ENCHANT_FOUND)
- ELSE(ENABLE_ENCHANT)
+ find_package(Aspell)
+ if(ASPELL_FOUND)
+ add_subdirectory( aspell )
+ endif()
+ endif()
+ else()
# Check for aspell libraries
- FIND_PACKAGE(Aspell)
- IF(ASPELL_FOUND)
- ADD_SUBDIRECTORY( aspell )
- ENDIF(ASPELL_FOUND)
- ENDIF(ENABLE_ENCHANT)
-ENDIF(ENABLE_ASPELL)
-
-IF(ENABLE_CHARSET)
+ find_package(Aspell)
+ if(ASPELL_FOUND)
+ add_subdirectory( aspell )
+ endif()
+ endif()
+endif()
+
+if(ENABLE_CHARSET)
# Check for iconv support.
- IF(ICONV_FOUND)
- ADD_SUBDIRECTORY( charset )
- ENDIF(ICONV_FOUND)
-ENDIF(ENABLE_CHARSET)
-
-IF(ENABLE_EXEC)
- ADD_SUBDIRECTORY( exec )
-ENDIF(ENABLE_EXEC)
-
-IF(ENABLE_FIFO)
- ADD_SUBDIRECTORY( fifo )
-ENDIF(ENABLE_FIFO)
-
-IF(ENABLE_IRC)
- ADD_SUBDIRECTORY( irc )
-ENDIF(ENABLE_IRC)
-
-IF(ENABLE_LOGGER)
- ADD_SUBDIRECTORY( logger )
-ENDIF(ENABLE_LOGGER)
-
-IF(ENABLE_RELAY)
- ADD_SUBDIRECTORY( relay )
-ENDIF(ENABLE_RELAY)
-
-IF(ENABLE_SCRIPT)
- ADD_SUBDIRECTORY( script )
-ENDIF(ENABLE_SCRIPT)
-
-IF(ENABLE_SCRIPTS AND ENABLE_PERL)
- FIND_PACKAGE(Perl)
- IF(PERL_FOUND)
- ADD_SUBDIRECTORY( perl )
- ENDIF(PERL_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_PERL)
-
-IF(ENABLE_SCRIPTS AND ENABLE_PYTHON)
- FIND_PACKAGE(Python)
- IF(PYTHON_FOUND)
- ADD_SUBDIRECTORY( python )
- ENDIF(PYTHON_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_PYTHON)
-
-IF(ENABLE_SCRIPTS AND ENABLE_RUBY)
- FIND_PACKAGE(Ruby)
- IF(RUBY_FOUND)
- ADD_SUBDIRECTORY( ruby )
- ENDIF(RUBY_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_RUBY)
-
-IF(ENABLE_SCRIPTS AND ENABLE_LUA)
- FIND_PACKAGE(Lua)
- IF(LUA_FOUND)
- ADD_SUBDIRECTORY( lua )
- ENDIF(LUA_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_LUA)
-
-IF(ENABLE_SCRIPTS AND ENABLE_TCL)
- FIND_PACKAGE(TCL)
- IF(TCL_FOUND)
- ADD_SUBDIRECTORY( tcl )
- ENDIF(TCL_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_TCL)
-
-IF(ENABLE_SCRIPTS AND ENABLE_GUILE)
- FIND_PACKAGE(Guile)
- IF(GUILE_FOUND)
- ADD_SUBDIRECTORY( guile )
- ENDIF(GUILE_FOUND)
-ENDIF(ENABLE_SCRIPTS AND ENABLE_GUILE)
-
-IF(ENABLE_TRIGGER)
- ADD_SUBDIRECTORY( trigger )
-ENDIF(ENABLE_TRIGGER)
-
-IF(ENABLE_XFER)
- ADD_SUBDIRECTORY( xfer )
-ENDIF(ENABLE_XFER)
-
-INSTALL(FILES weechat-plugin.h DESTINATION ${INCLUDEDIR})
+ if(ICONV_FOUND)
+ add_subdirectory( charset )
+ endif()
+endif()
+
+if(ENABLE_EXEC)
+ add_subdirectory( exec )
+endif()
+
+if(ENABLE_FIFO)
+ add_subdirectory( fifo )
+endif()
+
+if(ENABLE_IRC)
+ add_subdirectory( irc )
+endif()
+
+if(ENABLE_LOGGER)
+ add_subdirectory( logger )
+endif()
+
+if(ENABLE_RELAY)
+ add_subdirectory( relay )
+endif()
+
+if(ENABLE_SCRIPT)
+ add_subdirectory( script )
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_PERL)
+ find_package(Perl)
+ if(PERL_FOUND)
+ add_subdirectory( perl )
+ endif()
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
+ find_package(Python)
+ if(PYTHON_FOUND)
+ add_subdirectory( python )
+ endif()
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_RUBY)
+ find_package(Ruby)
+ if(RUBY_FOUND)
+ add_subdirectory( ruby )
+ endif()
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_LUA)
+ find_package(Lua)
+ if(LUA_FOUND)
+ add_subdirectory( lua )
+ endif()
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_TCL)
+ find_package(TCL)
+ if(TCL_FOUND)
+ add_subdirectory( tcl )
+ endif()
+endif()
+
+if(ENABLE_SCRIPTS AND ENABLE_GUILE)
+ find_package(Guile)
+ if(GUILE_FOUND)
+ add_subdirectory( guile )
+ endif()
+endif()
+
+if(ENABLE_TRIGGER)
+ add_subdirectory( trigger )
+endif()
+
+if(ENABLE_XFER)
+ add_subdirectory( xfer )
+endif()
+
+install(FILES weechat-plugin.h DESTINATION ${INCLUDEDIR})
diff --git a/src/plugins/alias/CMakeLists.txt b/src/plugins/alias/CMakeLists.txt
index 6ea65fa0e..8f7bd7eec 100644
--- a/src/plugins/alias/CMakeLists.txt
+++ b/src/plugins/alias/CMakeLists.txt
@@ -17,12 +17,12 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(alias MODULE
+add_library(alias MODULE
alias.c alias.h
alias-config.c alias-config.h
alias-info.c alias-info.h)
-SET_TARGET_PROPERTIES(alias PROPERTIES PREFIX "")
+set_target_properties(alias PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(alias)
+target_link_libraries(alias)
-INSTALL(TARGETS alias LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS alias LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/aspell/CMakeLists.txt b/src/plugins/aspell/CMakeLists.txt
index 8cb2fbef6..e6e35c37c 100644
--- a/src/plugins/aspell/CMakeLists.txt
+++ b/src/plugins/aspell/CMakeLists.txt
@@ -18,7 +18,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(aspell MODULE
+add_library(aspell MODULE
weechat-aspell.c weechat-aspell.h
weechat-aspell-bar-item.c weechat-aspell-bar-item.h
weechat-aspell-command.c weechat-aspell-command.h
@@ -26,17 +26,17 @@ weechat-aspell-completion.c weechat-aspell-completion.h
weechat-aspell-config.c weechat-aspell-config.h
weechat-aspell-info.c weechat-aspell-info.h
weechat-aspell-speller.c weechat-aspell-speller.h)
-SET_TARGET_PROPERTIES(aspell PROPERTIES PREFIX "")
+set_target_properties(aspell PROPERTIES PREFIX "")
-IF(ENCHANT_FOUND)
- INCLUDE_DIRECTORIES(${ENCHANT_INCLUDE_DIR})
- TARGET_LINK_LIBRARIES(aspell ${ENCHANT_LIBRARIES})
- ADD_DEFINITIONS(-DUSE_ENCHANT)
-ELSE(ENCHANT_FOUND)
- IF(ASPELL_FOUND)
- INCLUDE_DIRECTORIES(${ASPELL_INCLUDE_PATH})
- TARGET_LINK_LIBRARIES(aspell ${ASPELL_LIBRARY})
- ENDIF(ASPELL_FOUND)
-ENDIF(ENCHANT_FOUND)
+if(ENCHANT_FOUND)
+ include_directories(${ENCHANT_INCLUDE_DIR})
+ target_link_libraries(aspell ${ENCHANT_LIBRARIES})
+ add_definitions(-DUSE_ENCHANT)
+else()
+ if(ASPELL_FOUND)
+ include_directories(${ASPELL_INCLUDE_PATH})
+ target_link_libraries(aspell ${ASPELL_LIBRARY})
+ endif()
+endif()
-INSTALL(TARGETS aspell LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS aspell LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/charset/CMakeLists.txt b/src/plugins/charset/CMakeLists.txt
index f50e567aa..66fd8a8f0 100644
--- a/src/plugins/charset/CMakeLists.txt
+++ b/src/plugins/charset/CMakeLists.txt
@@ -17,16 +17,16 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(charset MODULE charset.c)
-SET_TARGET_PROPERTIES(charset PROPERTIES PREFIX "")
+add_library(charset MODULE charset.c)
+set_target_properties(charset PROPERTIES PREFIX "")
-IF(ICONV_FOUND)
- INCLUDE_DIRECTORIES(${ICONV_INCLUDE_PATH})
- IF(ICONV_LIBRARY)
- TARGET_LINK_LIBRARIES(charset ${ICONV_LIBRARY})
- ELSE(ICONV_LIBRARY)
- TARGET_LINK_LIBRARIES(charset)
- ENDIF(ICONV_LIBRARY)
-ENDIF(ICONV_FOUND)
+if(ICONV_FOUND)
+ include_directories(${ICONV_INCLUDE_PATH})
+ if(ICONV_LIBRARY)
+ target_link_libraries(charset ${ICONV_LIBRARY})
+ else()
+ target_link_libraries(charset)
+ endif()
+endif()
-INSTALL(TARGETS charset LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS charset LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/exec/CMakeLists.txt b/src/plugins/exec/CMakeLists.txt
index a5286eabd..a303cdbde 100644
--- a/src/plugins/exec/CMakeLists.txt
+++ b/src/plugins/exec/CMakeLists.txt
@@ -17,14 +17,14 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(exec MODULE
+add_library(exec MODULE
exec.c exec.h
exec-buffer.c exec-buffer.h
exec-command.c exec-command.h
exec-completion.c exec-completion.h
exec-config.c exec-config.h)
-SET_TARGET_PROPERTIES(exec PROPERTIES PREFIX "")
+set_target_properties(exec PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(exec)
+target_link_libraries(exec)
-INSTALL(TARGETS exec LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS exec LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/fifo/CMakeLists.txt b/src/plugins/fifo/CMakeLists.txt
index 9b417286d..84bb40380 100644
--- a/src/plugins/fifo/CMakeLists.txt
+++ b/src/plugins/fifo/CMakeLists.txt
@@ -17,11 +17,11 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(fifo MODULE
+add_library(fifo MODULE
fifo.c fifo.h
fifo-info.c fifo-info.h)
-SET_TARGET_PROPERTIES(fifo PROPERTIES PREFIX "")
+set_target_properties(fifo PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(fifo)
+target_link_libraries(fifo)
-INSTALL(TARGETS fifo LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS fifo LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/guile/CMakeLists.txt b/src/plugins/guile/CMakeLists.txt
index c3d151090..0a444aab6 100644
--- a/src/plugins/guile/CMakeLists.txt
+++ b/src/plugins/guile/CMakeLists.txt
@@ -17,16 +17,16 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(guile MODULE weechat-guile.c weechat-guile.h
+add_library(guile MODULE weechat-guile.c weechat-guile.h
weechat-guile-api.c weechat-guile-api.h)
-SET_TARGET_PROPERTIES(guile PROPERTIES PREFIX "")
+set_target_properties(guile PROPERTIES PREFIX "")
-IF(GUILE_FOUND)
- INCLUDE_DIRECTORIES(${GUILE_INCLUDE_DIRS})
- SET(LINK_LIBS)
- LIST(APPEND LINK_LIBS ${GUILE_LDFLAGS})
- TARGET_LINK_LIBRARIES(guile ${LINK_LIBS} weechat_plugins_scripts)
-ENDIF(GUILE_FOUND)
+if(GUILE_FOUND)
+ include_directories(${GUILE_INCLUDE_DIRS})
+ set(LINK_LIBS)
+ list(APPEND LINK_LIBS ${GUILE_LDFLAGS})
+ target_link_libraries(guile ${LINK_LIBS} weechat_plugins_scripts)
+endif()
-INSTALL(TARGETS guile LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS guile LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/irc/CMakeLists.txt b/src/plugins/irc/CMakeLists.txt
index 31cb8903f..6b718849c 100644
--- a/src/plugins/irc/CMakeLists.txt
+++ b/src/plugins/irc/CMakeLists.txt
@@ -17,7 +17,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(irc MODULE
+add_library(irc MODULE
irc.c irc.h
irc-bar-item.c irc-bar-item.h
irc-buffer.c irc-buffer.h
@@ -42,17 +42,17 @@ irc-redirect.c irc-redirect.h
irc-sasl.c irc-sasl.h
irc-server.c irc-server.h
irc-upgrade.c irc-upgrade.h)
-SET_TARGET_PROPERTIES(irc PROPERTIES PREFIX "")
+set_target_properties(irc PROPERTIES PREFIX "")
-SET (LINK_LIBS)
+set(LINK_LIBS)
-IF(GNUTLS_FOUND)
- INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
- LIST(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
-ENDIF(GNUTLS_FOUND)
+if(GNUTLS_FOUND)
+ include_directories(${GNUTLS_INCLUDE_PATH})
+ list(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
+endif()
-LIST(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
+list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
-TARGET_LINK_LIBRARIES(irc ${LINK_LIBS})
+target_link_libraries(irc ${LINK_LIBS})
-INSTALL(TARGETS irc LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS irc LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/logger/CMakeLists.txt b/src/plugins/logger/CMakeLists.txt
index d76fa4176..db7b80484 100644
--- a/src/plugins/logger/CMakeLists.txt
+++ b/src/plugins/logger/CMakeLists.txt
@@ -17,14 +17,14 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(logger MODULE
+add_library(logger MODULE
logger.c logger.h
logger-buffer.c logger-buffer.h
logger-config.c logger-config.h
logger-info.c logger-info.h
logger-tail.c logger-tail.h)
-SET_TARGET_PROPERTIES(logger PROPERTIES PREFIX "")
+set_target_properties(logger PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(logger)
+target_link_libraries(logger)
-INSTALL(TARGETS logger LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS logger LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/lua/CMakeLists.txt b/src/plugins/lua/CMakeLists.txt
index d4102ad6f..cfbb31d94 100644
--- a/src/plugins/lua/CMakeLists.txt
+++ b/src/plugins/lua/CMakeLists.txt
@@ -18,18 +18,18 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(lua MODULE weechat-lua.c weechat-lua.h weechat-lua-api.c
+add_library(lua MODULE weechat-lua.c weechat-lua.h weechat-lua-api.c
weechat-lua-api.h)
-SET_TARGET_PROPERTIES(lua PROPERTIES PREFIX "")
+set_target_properties(lua PROPERTIES PREFIX "")
-IF(LUA_FOUND)
- INCLUDE_DIRECTORIES(${LUA_INCLUDE_PATH} )
- IF(LUA_LIBRARY AND LUALIB_LIBRARY)
- TARGET_LINK_LIBRARIES(lua ${LUA_LIBRARY} ${LUALIB_LIBRARY} weechat_plugins_scripts)
- ELSE(LUA_LIBRARY AND LUALIB_LIBRARY)
- TARGET_LINK_LIBRARIES(lua ${LUA_LIBRARY} weechat_plugins_scripts)
- ENDIF(LUA_LIBRARY AND LUALIB_LIBRARY)
-ENDIF(LUA_FOUND)
+if(LUA_FOUND)
+ include_directories(${LUA_INCLUDE_PATH} )
+ if(LUA_LIBRARY AND LUALIB_LIBRARY)
+ target_link_libraries(lua ${LUA_LIBRARY} ${LUALIB_LIBRARY} weechat_plugins_scripts)
+ else()
+ target_link_libraries(lua ${LUA_LIBRARY} weechat_plugins_scripts)
+ endif()
+endif()
-INSTALL(TARGETS lua LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS lua LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/perl/CMakeLists.txt b/src/plugins/perl/CMakeLists.txt
index 6c4e76c1a..b30e35107 100644
--- a/src/plugins/perl/CMakeLists.txt
+++ b/src/plugins/perl/CMakeLists.txt
@@ -17,30 +17,30 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(perl MODULE weechat-perl.c weechat-perl.h weechat-perl-api.c
+add_library(perl MODULE weechat-perl.c weechat-perl.h weechat-perl-api.c
weechat-perl-api.h)
-SET_TARGET_PROPERTIES(perl PROPERTIES PREFIX "")
+set_target_properties(perl PROPERTIES PREFIX "")
-IF(PERL_FOUND)
- IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+if(PERL_FOUND)
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# remove "-arch xxx" on Mac OS X
STRING(REGEX REPLACE "-arch ppc|-arch i386|-arch x86_64" "" PERL_CFLAGS "${PERL_CFLAGS}")
STRING(REGEX REPLACE "-arch ppc|-arch i386|-arch x86_64" "" PERL_LFLAGS "${PERL_LFLAGS}")
- ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- ADD_DEFINITIONS(${PERL_CFLAGS})
- INCLUDE_DIRECTORIES(${PERL_INCLUDE_PATH})
+ endif()
+ add_definitions(${PERL_CFLAGS})
+ include_directories(${PERL_INCLUDE_PATH})
# ugly hack to force linking against Dynaloader.a
- STRING(REGEX MATCH "/[^ $]*/DynaLoader.a" PERL_DYNALOADER ${PERL_LFLAGS})
- IF(PERL_DYNALOADER)
- STRING(REPLACE "${PERL_DYNALOADER}" "" PERL_LFLAGS "${PERL_LFLAGS}")
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${PERL_DYNALOADER} ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
- TARGET_LINK_LIBRARIES(perl ${PERL_LIBRARY} weechat_plugins_scripts ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
- ELSE(PERL_DYNALOADER)
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
- TARGET_LINK_LIBRARIES(perl ${PERL_LIBRARY} weechat_plugins_scripts)
- ENDIF(PERL_DYNALOADER)
-ENDIF(PERL_FOUND)
+ string(REGEX MATCH "/[^ $]*/DynaLoader.a" PERL_DYNALOADER ${PERL_LFLAGS})
+ if(PERL_DYNALOADER)
+ string(REPLACE "${PERL_DYNALOADER}" "" PERL_LFLAGS "${PERL_LFLAGS}")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PERL_DYNALOADER} ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
+ target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts ${CMAKE_CURRENT_BINARY_DIR}/libDynaLoader.a)
+ else()
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
+ target_link_libraries(perl ${PERL_LIBRARY} weechat_plugins_scripts)
+ endif()
+endif()
-INSTALL(TARGETS perl LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS perl LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt
index 221fc0002..e87f3a8a3 100644
--- a/src/plugins/python/CMakeLists.txt
+++ b/src/plugins/python/CMakeLists.txt
@@ -17,15 +17,15 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(python MODULE weechat-python.c weechat-python.h
+add_library(python MODULE weechat-python.c weechat-python.h
weechat-python-api.c weechat-python-api.h)
-SET_TARGET_PROPERTIES(python PROPERTIES PREFIX "")
+set_target_properties(python PROPERTIES PREFIX "")
-IF(PYTHON_FOUND)
- INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}")
- TARGET_LINK_LIBRARIES(python ${PYTHON_LIBRARY} weechat_plugins_scripts)
-ENDIF(PYTHON_FOUND)
+if(PYTHON_FOUND)
+ include_directories(${PYTHON_INCLUDE_PATH})
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}")
+ target_link_libraries(python ${PYTHON_LIBRARY} weechat_plugins_scripts)
+endif()
-INSTALL(TARGETS python LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS python LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt
index 613a89df6..f717e5ed4 100644
--- a/src/plugins/relay/CMakeLists.txt
+++ b/src/plugins/relay/CMakeLists.txt
@@ -17,7 +17,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(relay MODULE
+add_library(relay MODULE
relay.c relay.h
relay-buffer.c relay-buffer.h
relay-client.c relay-client.h
@@ -35,18 +35,18 @@ relay-raw.c relay-raw.h
relay-server.c relay-server.h
relay-upgrade.c relay-upgrade.h
relay-websocket.c relay-websocket.h)
-SET_TARGET_PROPERTIES(relay PROPERTIES PREFIX "")
+set_target_properties(relay PROPERTIES PREFIX "")
-SET (LINK_LIBS)
+set(LINK_LIBS)
-LIST(APPEND LINK_LIBS ${ZLIB_LIBRARY})
-LIST(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
+list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
+list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
-IF(GNUTLS_FOUND)
- INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_PATH})
- LIST(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
-ENDIF(GNUTLS_FOUND)
+if(GNUTLS_FOUND)
+ include_directories(${GNUTLS_INCLUDE_PATH})
+ list(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
+endif()
-TARGET_LINK_LIBRARIES(relay ${LINK_LIBS})
+target_link_libraries(relay ${LINK_LIBS})
-INSTALL(TARGETS relay LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS relay LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt
index 3058f97e3..061543ec2 100644
--- a/src/plugins/ruby/CMakeLists.txt
+++ b/src/plugins/ruby/CMakeLists.txt
@@ -17,16 +17,16 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(ruby MODULE weechat-ruby.c weechat-ruby.h weechat-ruby-api.c
+add_library(ruby MODULE weechat-ruby.c weechat-ruby.h weechat-ruby-api.c
weechat-ruby-api.h)
-SET_TARGET_PROPERTIES(ruby PROPERTIES PREFIX "")
+set_target_properties(ruby PROPERTIES PREFIX "")
-IF(RUBY_FOUND)
- INCLUDE_DIRECTORIES(${RUBY_INCLUDE_DIRS})
- SET(LINK_LIBS)
- LIST(APPEND LINK_LIBS ${RUBY_LDFLAGS})
- TARGET_LINK_LIBRARIES(ruby ${LINK_LIBS} ${RUBY_LIB} weechat_plugins_scripts)
-ENDIF(RUBY_FOUND)
+if(RUBY_FOUND)
+ include_directories(${RUBY_INCLUDE_DIRS})
+ set(LINK_LIBS)
+ list(APPEND LINK_LIBS ${RUBY_LDFLAGS})
+ target_link_libraries(ruby ${LINK_LIBS} ${RUBY_LIB} weechat_plugins_scripts)
+endif(RUBY_FOUND)
-INSTALL(TARGETS ruby LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS ruby LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/script/CMakeLists.txt b/src/plugins/script/CMakeLists.txt
index 67beb58c0..bd59f2af6 100644
--- a/src/plugins/script/CMakeLists.txt
+++ b/src/plugins/script/CMakeLists.txt
@@ -17,7 +17,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(script MODULE
+add_library(script MODULE
script.c script.h
script-action.c script-action.h
script-buffer.c script-buffer.h
@@ -26,13 +26,13 @@ script-completion.c script-completion.h
script-config.c script-config.h
script-info.c script-info.h
script-repo.c script-repo.h)
-SET_TARGET_PROPERTIES(script PROPERTIES PREFIX "")
+set_target_properties(script PROPERTIES PREFIX "")
-SET (LINK_LIBS)
+set(LINK_LIBS)
-LIST(APPEND LINK_LIBS ${ZLIB_LIBRARY})
-LIST(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
+list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
+list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
-TARGET_LINK_LIBRARIES(script ${LINK_LIBS})
+target_link_libraries(script ${LINK_LIBS})
-INSTALL(TARGETS script LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS script LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/tcl/CMakeLists.txt b/src/plugins/tcl/CMakeLists.txt
index b76eada01..1baac63b8 100644
--- a/src/plugins/tcl/CMakeLists.txt
+++ b/src/plugins/tcl/CMakeLists.txt
@@ -19,19 +19,17 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(tcl MODULE weechat-tcl.c weechat-tcl.h
+add_library(tcl MODULE weechat-tcl.c weechat-tcl.h
weechat-tcl-api.c weechat-tcl-api.h)
-SET_TARGET_PROPERTIES(tcl PROPERTIES PREFIX "")
+set_target_properties(tcl PROPERTIES PREFIX "")
-IF(TCL_FOUND)
- SET(CMAKE_REQUIRED_INCLUDES "${TCL_INCLUDE_PATH}")
- SET(CMAKE_REQUIRED_LIBRARIES "${TCL_LIBRARY}")
+if(TCL_FOUND)
+ set(CMAKE_REQUIRED_INCLUDES "${TCL_INCLUDE_PATH}")
+ set(CMAKE_REQUIRED_LIBRARIES "${TCL_LIBRARY}")
+ include_directories(${TCL_INCLUDE_PATH})
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
+ target_link_libraries(tcl ${TCL_LIBRARY} weechat_plugins_scripts)
+endif()
- INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
- SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
- TARGET_LINK_LIBRARIES(tcl ${TCL_LIBRARY} weechat_plugins_scripts)
-
-ENDIF(TCL_FOUND)
-
-INSTALL(TARGETS tcl LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS tcl LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/trigger/CMakeLists.txt b/src/plugins/trigger/CMakeLists.txt
index 59d8e1c00..89b26d10a 100644
--- a/src/plugins/trigger/CMakeLists.txt
+++ b/src/plugins/trigger/CMakeLists.txt
@@ -17,15 +17,15 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(trigger MODULE
+add_library(trigger MODULE
trigger.c trigger.h
trigger-buffer.c trigger-buffer.h
trigger-callback.c trigger-callback.h
trigger-command.c trigger-command.h
trigger-completion.c trigger-completion.h
trigger-config.c trigger-config.h)
-SET_TARGET_PROPERTIES(trigger PROPERTIES PREFIX "")
+set_target_properties(trigger PROPERTIES PREFIX "")
-TARGET_LINK_LIBRARIES(trigger)
+target_link_libraries(trigger)
-INSTALL(TARGETS trigger LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS trigger LIBRARY DESTINATION ${LIBDIR}/plugins)
diff --git a/src/plugins/xfer/CMakeLists.txt b/src/plugins/xfer/CMakeLists.txt
index bd07db390..8155b1a90 100644
--- a/src/plugins/xfer/CMakeLists.txt
+++ b/src/plugins/xfer/CMakeLists.txt
@@ -17,7 +17,7 @@
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
#
-ADD_LIBRARY(xfer MODULE
+add_library(xfer MODULE
xfer.c xfer.h
xfer-buffer.c xfer-buffer.h
xfer-chat.c xfer-chat.h
@@ -29,12 +29,12 @@ xfer-file.c xfer-file.h
xfer-info.c xfer-info.h
xfer-network.c xfer-network.h
xfer-upgrade.c xfer-upgrade.h)
-SET_TARGET_PROPERTIES(xfer PROPERTIES PREFIX "")
+set_target_properties(xfer PROPERTIES PREFIX "")
-SET (LINK_LIBS)
+set(LINK_LIBS)
-LIST(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
+list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
-TARGET_LINK_LIBRARIES(xfer ${LINK_LIBS})
+target_link_libraries(xfer ${LINK_LIBS})
-INSTALL(TARGETS xfer LIBRARY DESTINATION ${LIBDIR}/plugins)
+install(TARGETS xfer LIBRARY DESTINATION ${LIBDIR}/plugins)