1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: fix style in CMake files

This commit is contained in:
Sébastien Helleu
2019-09-28 20:37:38 +02:00
parent 779420d50d
commit baf8f635ff
39 changed files with 254 additions and 210 deletions
+12 -6
View File
@@ -257,19 +257,23 @@ configure_file(config.h.cmake config.h @ONLY)
# set the git version in "config-git.h"
add_custom_target(version_git ALL
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/git-version.sh" "${CMAKE_CURRENT_SOURCE_DIR}" "${VERSION}" "config-git.h"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
IMMEDIATE @ONLY
)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
)
add_custom_target(dist
"${CMAKE_CURRENT_SOURCE_DIR}/tools/makedist.sh" "${VERSION}" "HEAD" "${CMAKE_CURRENT_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# pkgconfig file
set(PACKAGE "${PROJECT_NAME}")
@@ -291,7 +295,8 @@ if(CYGWIN)
${CMAKE_CURRENT_SOURCE_DIR}/Contributing.adoc
${CMAKE_CURRENT_SOURCE_DIR}/README.adoc
${CMAKE_CURRENT_SOURCE_DIR}/ReleaseNotes.adoc
DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME})
DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}
)
endif()
# icon
@@ -313,7 +318,8 @@ set(CPACK_PACKAGE_FILE_NAME weechat-binary-${VERSION})
# source package
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
set(CPACK_SOURCE_PACKAGE_FILE_NAME weechat-${VERSION})
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git" "/build/" "/m4/"
set(CPACK_SOURCE_IGNORE_FILES
"/\\\\.git" "/build/" "/m4/"
"/autom4te\\\\.cache/" "/ABOUT-NLS$" "/config\\\\.guess$" "/config\\\\.h$"
"/config\\\\.h.in$" "/config\\\\.log$" "/config\\\\.rpath$"
"/config\\\\.status$" "/config\\\\.sub$" "/configure$" "/depcomp$"
+2 -2
View File
@@ -34,7 +34,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
execute_process(
COMMAND ${ASCIIDOCTOR_EXECUTABLE} --version
OUTPUT_VARIABLE ASCIIDOCTOR_VERSION
)
)
string(REGEX REPLACE "^Asciidoctor ([^ ]+) .*" "\\1" ASCIIDOCTOR_VERSION "${ASCIIDOCTOR_VERSION}")
@@ -45,5 +45,5 @@ if(ASCIIDOCTOR_EXECUTABLE)
mark_as_advanced(
ASCIIDOCTOR_EXECUTABLE
ASCIIDOCTOR_VERSION
)
)
endif()
+1 -1
View File
@@ -55,4 +55,4 @@ endif()
mark_as_advanced(
ASPELL_INCLUDE_PATH
ASPELL_LIBRARY
)
)
+2 -2
View File
@@ -27,8 +27,8 @@
# CPPUTEST_LIBRARIES = Link options to compile with CppUTest
if(CPPUTEST_FOUND)
# Already in cache, be silent
set(CPPUTEST_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(CPPUTEST_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig)
+10 -11
View File
@@ -13,10 +13,8 @@
if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
# in cache already
set(ENCHANT_FOUND TRUE)
else()
if(NOT WIN32)
# use pkg-config to get the directories and then use these values
@@ -27,17 +25,19 @@ else()
endif()
find_path(ENCHANT_INCLUDE_DIR
NAMES enchant++.h
HINTS ${PC_ENCHANT_INCLUDEDIR}
${PC_ENCHANT_INCLUDE_DIRS}
PATH_SUFFIXES enchant )
NAMES enchant++.h
HINTS ${PC_ENCHANT_INCLUDEDIR} ${PC_ENCHANT_INCLUDE_DIRS}
PATH_SUFFIXES enchant
)
find_library(ENCHANT_LIBRARIES NAMES enchant
HINTS ${PC_ENCHANT_LIBDIR}
${PC_ENCHANT_LIBRARY_DIRS} )
find_library(ENCHANT_LIBRARIES
NAMES enchant
HINTS ${PC_ENCHANT_LIBDIR}
${PC_ENCHANT_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES )
find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
@@ -47,5 +47,4 @@ else()
check_symbol_exists(enchant_get_version "enchant.h" HAVE_ENCHANT_GET_VERSION)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
+3 -4
View File
@@ -28,8 +28,8 @@
# GETTEXT_FOUND = is gettext usable on system?
if(GETTEXT_FOUND)
# Already in cache, be silent
set(GETTEXT_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(GETTEXT_FIND_QUIETLY TRUE)
endif()
include(CheckIncludeFiles)
@@ -54,7 +54,7 @@ if(HAVE_LIBINTL_H)
PATHS
/usr/local/lib
/usr/lib
)
)
if(LIBINTL_LIBRARY)
if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(CMAKE_REQUIRED_LIBRARIES "iconv")
@@ -62,7 +62,6 @@ if(HAVE_LIBINTL_H)
else()
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
endif()
if(LIBINTL_HAS_DGETTEXT)
set(GETTEXT_FOUND TRUE)
endif()
+5 -5
View File
@@ -30,23 +30,23 @@
# GNUTLS_LDFLAGS = ldflags to use to compile
if(GNUTLS_INCLUDE_PATH AND GNUTLS_LIBRARY)
# Already in cache, be silent
set(GNUTLS_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(GNUTLS_FIND_QUIETLY TRUE)
endif()
find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=prefix gnutls
OUTPUT_VARIABLE GNUTLS_PREFIX
OUTPUT_VARIABLE GNUTLS_PREFIX
)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags gnutls
OUTPUT_VARIABLE GNUTLS_CFLAGS
OUTPUT_VARIABLE GNUTLS_CFLAGS
)
string(REGEX REPLACE "[\r\n]" "" GNUTLS_CFLAGS "${GNUTLS_CFLAGS}")
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs gnutls
OUTPUT_VARIABLE GNUTLS_LDFLAGS
OUTPUT_VARIABLE GNUTLS_LDFLAGS
)
string(REGEX REPLACE "[\r\n]" "" GNUTLS_LDFLAGS "${GNUTLS_LDFLAGS}")
+2 -2
View File
@@ -27,8 +27,8 @@
# GUILE_LIBRARIES = Link options to compile Guile
if(GUILE_FOUND)
# Already in cache, be silent
set(GUILE_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(GUILE_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig)
+2 -2
View File
@@ -29,8 +29,8 @@
# ICONV_FOUND = is iconv usable on system?
if(ICONV_FOUND)
# Already in cache, be silent
set(ICONV_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(ICONV_FIND_QUIETLY TRUE)
endif()
include(CheckLibraryExists)
+2 -2
View File
@@ -29,8 +29,8 @@
# LUA_FOUND = is liblua usable on system?
if(LUA_FOUND)
# Already in cache, be silent
set(LUA_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(LUA_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig)
+4 -2
View File
@@ -32,7 +32,8 @@ if(NOT PHP_FOUND)
php-config7.2 php-config72
php-config7.1 php-config71
php-config7.0 php-config70
php-config php-config7)
php-config php-config7
)
if (PHP_CONFIG_EXECUTABLE)
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --prefix OUTPUT_VARIABLE PHP_LIB_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --includes OUTPUT_VARIABLE PHP_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -41,7 +42,8 @@ if(NOT PHP_FOUND)
if(${PHP_VERSION} MATCHES "^7")
find_library(PHP_LIB
NAMES php7.3 php7.2 php7.1 php7.0 php7
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64)
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64
)
if(PHP_LIB)
get_filename_component(PHP_LIB_DIR ${PHP_LIB} DIRECTORY)
string(REPLACE "-I" "" PHP_INCLUDE_DIRS ${PHP_INCLUDE_DIRS})
+9 -9
View File
@@ -29,31 +29,31 @@
# PERL_LFLAGS = perl compiler options for linking
if(PERL_FOUND)
# Already in cache, be silent
set(PERL_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(PERL_FIND_QUIETLY TRUE)
endif()
find_program(PERL_EXECUTABLE
NAMES perl perl5
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
)
)
if(PERL_EXECUTABLE)
execute_process(
COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \"\$Config{archlibexp}/CORE\""
OUTPUT_VARIABLE PERL_INTERNAL_DIR
)
)
execute_process(
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
OUTPUT_VARIABLE PERL_CFLAGS
)
)
execute_process(
COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ldopts
OUTPUT_VARIABLE PERL_LFLAGS
)
)
# remove the new lines from the output by replacing them with empty strings
string(REPLACE "\n" "" PERL_INTERNAL_DIR "${PERL_INTERNAL_DIR}")
@@ -63,12 +63,12 @@ if(PERL_EXECUTABLE)
find_path(PERL_INCLUDE_PATH
NAMES perl.h
PATHS ${PERL_INTERNAL_DIR}
)
)
find_library(PERL_LIBRARY
NAMES perl
PATHS /usr/lib /usr/local/lib /usr/pkg/lib ${PERL_INTERNAL_DIR}
)
)
if(PERL_LIBRARY AND PERL_INCLUDE_PATH)
set(PERL_FOUND TRUE)
@@ -80,5 +80,5 @@ if(PERL_EXECUTABLE)
PERL_LIBRARY
PERL_CFLAGS
PERL_LFLAGS
)
)
endif()
+2 -2
View File
@@ -31,7 +31,7 @@
include(FindPkgConfig)
if(ENABLE_PYTHON2)
pkg_check_modules(PYTHON python2)
pkg_check_modules(PYTHON python2)
else()
pkg_check_modules(PYTHON python3)
pkg_check_modules(PYTHON python3)
endif()
+10 -10
View File
@@ -27,8 +27,8 @@
# RUBY_LIB = ruby library (found without pkg-config)
if(RUBY_FOUND)
# Already in cache, be silent
set(RUBY_FIND_QUIETLY TRUE)
# Already in cache, be silent
set(RUBY_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig)
@@ -43,33 +43,33 @@ else()
find_program(RUBY_EXECUTABLE
NAMES ruby2.6.0 ruby260 ruby2.6 ruby2.5.0 ruby250 ruby2.5 ruby2.4.0 ruby240 ruby2.4 ruby2.3.0 ruby230 ruby2.3 ruby23 ruby2.2.3 ruby223 ruby2.2.2 ruby222 ruby2.2.1 ruby221 ruby2.2.0 ruby220 ruby2.2 ruby22 ruby2.1.7 ruby217 ruby2.1.6 ruby216 ruby2.1.5 ruby215 ruby2.1.4 ruby214 ruby2.1.3 ruby213 ruby2.1.2 ruby212 ruby2.1.1 ruby211 ruby2.1.0 ruby210 ruby2.1 ruby21 ruby2.0 ruby20 ruby1.9.3 ruby193 ruby1.9.2 ruby192 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby
PATHS /usr/bin /usr/local/bin /usr/pkg/bin
)
)
if(RUBY_EXECUTABLE)
execute_process(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir'] || RbConfig::CONFIG['archdir']"
OUTPUT_VARIABLE RUBY_ARCH_DIR
)
)
execute_process(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']"
OUTPUT_VARIABLE RUBY_ARCH
)
)
execute_process(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']"
OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH
)
)
execute_process(
COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']"
OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH
)
)
find_path(RUBY_INCLUDE_DIRS
NAMES ruby.h
PATHS ${RUBY_ARCH_DIR}
)
)
set(RUBY_INCLUDE_ARCH "${RUBY_INCLUDE_DIRS}/${RUBY_ARCH}")
find_library(RUBY_LIB
NAMES ruby-1.9.3 ruby1.9.3 ruby193 ruby-1.9.2 ruby1.9.2 ruby192 ruby-1.9.1 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby
PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH}
)
)
if(RUBY_LIB AND RUBY_INCLUDE_DIRS)
set(RUBY_FOUND TRUE)
endif()
@@ -78,6 +78,6 @@ else()
RUBY_INCLUDE_DIRS
RUBY_LIBRARY_DIRS
RUBY_LIB
)
)
endif()
endif()
+1 -1
View File
@@ -41,7 +41,7 @@ find_library(ZLIB_LIBRARY
${ZLIB_NAMES}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
)
)
mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
+5 -5
View File
@@ -30,7 +30,7 @@ set(PO_FILES
pt_BR.po
ru.po
tr.po
)
)
set(BUGS_ADDRESS "flashcode@flashtux.org")
set(POT_FILE ${PROJECT_NAME}.pot)
@@ -60,7 +60,7 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
ARGS -o ${POT_FILE_PATH} --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory=${CMAKE_SOURCE_DIR} --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
DEPENDS ${POT_DEPENDS}
COMMENT "Generating ${POT_FILE}"
)
)
set(GMO_FILES)
set(UPDATE_PO_TARGETS)
@@ -76,14 +76,14 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
COMMAND ${MSGFMT_EXECUTABLE} ARGS -c --statistics --verbose --output-file=/dev/null ${CMAKE_CURRENT_BINARY_DIR}/${pofile}
DEPENDS ${POT_FILE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}
COMMENT "Compiling ${polang}.po"
)
)
# Update .po files in source directory (if needed)
add_custom_target(
update-${pofile}
COMMAND ${MSGMERGE_EXECUTABLE} --quiet --update --backup=none ${CMAKE_CURRENT_SOURCE_DIR}/${pofile} ${POT_FILE_PATH}
COMMENT "Updating ${polang}.po"
)
)
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
install(FILES ${gmofile} DESTINATION ${LOCALEDIR}/${polang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
@@ -97,7 +97,7 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
update-${POT_FILE}
COMMAND ${MSGMERGE_EXECUTABLE} --quiet --update --backup=none ${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE} ${POT_FILE_PATH}
COMMENT "Updating ${POT_FILE}"
)
)
# Update all .po and weechat.pot in source directory (if needed)
add_custom_target(update-po DEPENDS update-${POT_FILE} ${UPDATE_PO_TARGETS})
+15 -3
View File
@@ -46,12 +46,24 @@ set(WEECHAT_CURSES_MAIN_HEADLESS_SRC main.c)
set(EXECUTABLE weechat-headless)
add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_HEADLESS_SRC})
add_executable(${EXECUTABLE}
${WEECHAT_CURSES_MAIN_HEADLESS_SRC}
)
add_dependencies(${EXECUTABLE} weechat_gui_headless weechat_ncurses_fake)
add_dependencies(${EXECUTABLE}
weechat_gui_headless
weechat_ncurses_fake
)
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_headless weechat_ncurses_fake ${EXTRA_LIBS} ${STATIC_LIBS} coverage_config)
target_link_libraries(${EXECUTABLE}
${STATIC_LIBS}
weechat_gui_headless
weechat_ncurses_fake
${EXTRA_LIBS}
${STATIC_LIBS}
coverage_config
)
# Install executable
install(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
+6 -5
View File
@@ -18,11 +18,12 @@
#
add_library(alias MODULE
alias.c alias.h
alias-command.c alias-command.h
alias-completion.c alias-completion.h
alias-config.c alias-config.h
alias-info.c alias-info.h)
alias.c alias.h
alias-command.c alias-command.h
alias-completion.c alias-completion.h
alias-config.c alias-config.h
alias-info.c alias-info.h
)
set_target_properties(alias PROPERTIES PREFIX "")
target_link_libraries(alias coverage_config)
+7 -6
View File
@@ -18,12 +18,13 @@
#
add_library(buflist MODULE
buflist.c buflist.h
buflist-bar-item.c buflist-bar-item.h
buflist-command.c buflist-command.h
buflist-config.c buflist-config.h
buflist-info.c buflist-info.h
buflist-mouse.c buflist-mouse.h)
buflist.c buflist.h
buflist-bar-item.c buflist-bar-item.h
buflist-command.c buflist-command.h
buflist-config.c buflist-config.h
buflist-info.c buflist-info.h
buflist-mouse.c buflist-mouse.h
)
set_target_properties(buflist PROPERTIES PREFIX "")
target_link_libraries(buflist coverage_config)
+3 -1
View File
@@ -17,7 +17,9 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(charset MODULE charset.c)
add_library(charset MODULE
charset.c
)
set_target_properties(charset PROPERTIES PREFIX "")
if(ICONV_FOUND)
+6 -5
View File
@@ -18,11 +18,12 @@
#
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)
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 "")
target_link_libraries(exec coverage_config)
+5 -4
View File
@@ -18,10 +18,11 @@
#
add_library(fifo MODULE
fifo.c fifo.h
fifo-command.c fifo-command.h
fifo-config.c fifo-config.h
fifo-info.c fifo-info.h)
fifo.c fifo.h
fifo-command.c fifo-command.h
fifo-config.c fifo-config.h
fifo-info.c fifo-info.h
)
set_target_properties(fifo PROPERTIES PREFIX "")
target_link_libraries(fifo coverage_config)
+10 -9
View File
@@ -18,15 +18,16 @@
#
add_library(fset MODULE
fset.c fset.h
fset-bar-item.c fset-bar-item.h
fset-buffer.c fset-buffer.h
fset-command.c fset-command.h
fset-completion.c fset-completion.h
fset-config.c fset-config.h
fset-info.c fset-info.h
fset-mouse.c fset-mouse.h
fset-option.c fset-option.h)
fset.c fset.h
fset-bar-item.c fset-bar-item.h
fset-buffer.c fset-buffer.h
fset-command.c fset-command.h
fset-completion.c fset-completion.h
fset-config.c fset-config.h
fset-info.c fset-info.h
fset-mouse.c fset-mouse.h
fset-option.c fset-option.h
)
set_target_properties(fset PROPERTIES PREFIX "")
target_link_libraries(fset coverage_config)
+4 -3
View File
@@ -17,9 +17,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(guile MODULE weechat-guile.c weechat-guile.h
weechat-guile-api.c weechat-guile-api.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 "")
if(GUILE_FOUND)
+26 -25
View File
@@ -18,31 +18,32 @@
#
add_library(irc MODULE
irc.c irc.h
irc-bar-item.c irc-bar-item.h
irc-buffer.c irc-buffer.h
irc-channel.c irc-channel.h
irc-color.c irc-color.h
irc-command.c irc-command.h
irc-completion.c irc-completion.h
irc-config.c irc-config.h
irc-ctcp.c irc-ctcp.h
irc-debug.c irc-debug.h
irc-ignore.c irc-ignore.h
irc-info.c irc-info.h
irc-input.c irc-input.h
irc-message.c irc-message.h
irc-mode.c irc-mode.h
irc-modelist.c irc-modelist.h
irc-msgbuffer.c irc-msgbuffer.h
irc-nick.c irc-nick.h
irc-notify.c irc-notify.h
irc-protocol.c irc-protocol.h
irc-raw.c irc-raw.h
irc-redirect.c irc-redirect.h
irc-sasl.c irc-sasl.h
irc-server.c irc-server.h
irc-upgrade.c irc-upgrade.h)
irc.c irc.h
irc-bar-item.c irc-bar-item.h
irc-buffer.c irc-buffer.h
irc-channel.c irc-channel.h
irc-color.c irc-color.h
irc-command.c irc-command.h
irc-completion.c irc-completion.h
irc-config.c irc-config.h
irc-ctcp.c irc-ctcp.h
irc-debug.c irc-debug.h
irc-ignore.c irc-ignore.h
irc-info.c irc-info.h
irc-input.c irc-input.h
irc-message.c irc-message.h
irc-mode.c irc-mode.h
irc-modelist.c irc-modelist.h
irc-msgbuffer.c irc-msgbuffer.h
irc-nick.c irc-nick.h
irc-notify.c irc-notify.h
irc-protocol.c irc-protocol.h
irc-raw.c irc-raw.h
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(LINK_LIBS)
+5 -4
View File
@@ -19,10 +19,11 @@
enable_language(CXX)
add_library(javascript MODULE weechat-js.cpp weechat-js.h
weechat-js-v8.cpp weechat-js-v8.h
weechat-js-api.cpp weechat-js-api.h)
add_library(javascript MODULE
weechat-js.cpp weechat-js.h
weechat-js-v8.cpp weechat-js-v8.h
weechat-js-api.cpp weechat-js-api.h
)
set_target_properties(javascript PROPERTIES PREFIX "")
if(V8_FOUND)
+8 -7
View File
@@ -18,13 +18,14 @@
#
add_library(logger MODULE
logger.c logger.h
logger-backlog.c logger-backlog.h
logger-buffer.c logger-buffer.h
logger-command.c logger-command.h
logger-config.c logger-config.h
logger-info.c logger-info.h
logger-tail.c logger-tail.h)
logger.c logger.h
logger-backlog.c logger-backlog.h
logger-buffer.c logger-buffer.h
logger-command.c logger-command.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 "")
target_link_libraries(logger coverage_config)
+4 -3
View File
@@ -18,9 +18,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(lua MODULE weechat-lua.c weechat-lua.h weechat-lua-api.c
weechat-lua-api.h)
add_library(lua MODULE
weechat-lua.c weechat-lua.h
weechat-lua-api.c weechat-lua-api.h
)
set_target_properties(lua PROPERTIES PREFIX "")
if(LUA_FOUND)
+4 -3
View File
@@ -17,9 +17,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(perl MODULE weechat-perl.c weechat-perl.h weechat-perl-api.c
weechat-perl-api.h)
add_library(perl MODULE
weechat-perl.c weechat-perl.h
weechat-perl-api.c weechat-perl-api.h
)
set_target_properties(perl PROPERTIES PREFIX "")
if(PERL_FOUND)
+4 -3
View File
@@ -17,9 +17,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(php MODULE weechat-php.c weechat-php.h weechat-php-api.c
weechat-php-api.h)
add_library(php MODULE
weechat-php.c weechat-php.h
weechat-php-api.c weechat-php-api.h
)
set_target_properties(php PROPERTIES PREFIX "")
if(PHP_FOUND)
+4 -3
View File
@@ -17,9 +17,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(python MODULE weechat-python.c weechat-python.h
weechat-python-api.c weechat-python-api.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 "")
if(PYTHON_FOUND)
+18 -17
View File
@@ -18,23 +18,24 @@
#
add_library(relay MODULE
relay.c relay.h
relay-buffer.c relay-buffer.h
relay-client.c relay-client.h
irc/relay-irc.c irc/relay-irc.h
weechat/relay-weechat.c weechat/relay-weechat.h
weechat/relay-weechat-msg.c weechat/relay-weechat-msg.h
weechat/relay-weechat-nicklist.c weechat/relay-weechat-nicklist.h
weechat/relay-weechat-protocol.c weechat/relay-weechat-protocol.h
relay-command.c relay-command.h
relay-completion.c relay-completion.h
relay-config.c relay-config.h
relay-info.c relay-info.h
relay-network.c relay-network.h
relay-raw.c relay-raw.h
relay-server.c relay-server.h
relay-upgrade.c relay-upgrade.h
relay-websocket.c relay-websocket.h)
relay.c relay.h
relay-buffer.c relay-buffer.h
relay-client.c relay-client.h
irc/relay-irc.c irc/relay-irc.h
weechat/relay-weechat.c weechat/relay-weechat.h
weechat/relay-weechat-msg.c weechat/relay-weechat-msg.h
weechat/relay-weechat-nicklist.c weechat/relay-weechat-nicklist.h
weechat/relay-weechat-protocol.c weechat/relay-weechat-protocol.h
relay-command.c relay-command.h
relay-completion.c relay-completion.h
relay-config.c relay-config.h
relay-info.c relay-info.h
relay-network.c relay-network.h
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(LINK_LIBS)
+4 -3
View File
@@ -17,9 +17,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(ruby MODULE weechat-ruby.c weechat-ruby.h weechat-ruby-api.c
weechat-ruby-api.h)
add_library(ruby MODULE
weechat-ruby.c weechat-ruby.h
weechat-ruby-api.c weechat-ruby-api.h
)
set_target_properties(ruby PROPERTIES PREFIX "")
if(RUBY_FOUND)
+10 -9
View File
@@ -18,15 +18,16 @@
#
add_library(script MODULE
script.c script.h
script-action.c script-action.h
script-buffer.c script-buffer.h
script-command.c script-command.h
script-completion.c script-completion.h
script-config.c script-config.h
script-info.c script-info.h
script-mouse.c script-mouse.h
script-repo.c script-repo.h)
script.c script.h
script-action.c script-action.h
script-buffer.c script-buffer.h
script-command.c script-command.h
script-completion.c script-completion.h
script-config.c script-config.h
script-info.c script-info.h
script-mouse.c script-mouse.h
script-repo.c script-repo.h
)
set_target_properties(script PROPERTIES PREFIX "")
set(LINK_LIBS)
+8 -7
View File
@@ -19,13 +19,14 @@
#
add_library(spell MODULE
spell.c spell.h
spell-bar-item.c spell-bar-item.h
spell-command.c spell-command.h
spell-completion.c spell-completion.h
spell-config.c spell-config.h
spell-info.c spell-info.h
spell-speller.c spell-speller.h)
spell.c spell.h
spell-bar-item.c spell-bar-item.h
spell-command.c spell-command.h
spell-completion.c spell-completion.h
spell-config.c spell-config.h
spell-info.c spell-info.h
spell-speller.c spell-speller.h
)
set_target_properties(spell PROPERTIES PREFIX "")
if(ENCHANT_FOUND)
+4 -3
View File
@@ -19,9 +19,10 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(tcl MODULE weechat-tcl.c weechat-tcl.h
weechat-tcl-api.c weechat-tcl-api.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 "")
if(TCL_FOUND)
+7 -6
View File
@@ -18,12 +18,13 @@
#
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)
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 "")
target_link_libraries(trigger coverage_config)
+12 -11
View File
@@ -18,17 +18,18 @@
#
add_library(xfer MODULE
xfer.c xfer.h
xfer-buffer.c xfer-buffer.h
xfer-chat.c xfer-chat.h
xfer-command.c xfer-command.h
xfer-completion.c xfer-completion.h
xfer-config.c xfer-config.h
xfer-dcc.c xfer-dcc.h
xfer-file.c xfer-file.h
xfer-info.c xfer-info.h
xfer-network.c xfer-network.h
xfer-upgrade.c xfer-upgrade.h)
xfer.c xfer.h
xfer-buffer.c xfer-buffer.h
xfer-chat.c xfer-chat.h
xfer-command.c xfer-command.h
xfer-completion.c xfer-completion.h
xfer-config.c xfer-config.h
xfer-dcc.c xfer-dcc.h
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(LINK_LIBS)
+8 -4
View File
@@ -82,21 +82,25 @@ target_link_libraries(tests
${EXTRA_LIBS}
${CURL_LIBRARIES}
${CPPUTEST_LIBRARIES}
-rdynamic)
-rdynamic
)
add_dependencies(tests
weechat_core
weechat_plugins
weechat_gui_common
weechat_gui_headless
weechat_ncurses_fake
weechat_unit_tests_core)
weechat_unit_tests_core
)
# test for cmake (ctest)
add_test(NAME unit
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND tests -v)
COMMAND tests -v
)
set_property(TEST unit PROPERTY
ENVIRONMENT "WEECHAT_TESTS_ARGS=-p;"
"WEECHAT_EXTRA_LIBDIR=${PROJECT_BINARY_DIR}/src;"
"WEECHAT_TESTS_SCRIPTS_DIR=${CMAKE_CURRENT_SOURCE_DIR}/scripts/python"
"WEECHAT_TESTS_PLUGINS_LIB=${CMAKE_CURRENT_BINARY_DIR}/libweechat_unit_tests_plugins.so")
"WEECHAT_TESTS_PLUGINS_LIB=${CMAKE_CURRENT_BINARY_DIR}/libweechat_unit_tests_plugins.so"
)