From ece92efd81938e271a9c59312eafd4939ad0105b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 20 Apr 2019 10:15:01 +0200 Subject: [PATCH] tests: add link with iconv library (if found) This fixes a compilation error on FreeBSD. --- ChangeLog.adoc | 1 + tests/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 8948268af..53798298a 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -58,6 +58,7 @@ Build:: * core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage options (CMake ≥ 3.0 is now required) * core: fix compilation on Mac OS (issue #1308) * lua: add detection of Lua 5.3 with autotools + * tests: fix compilation of tests on FreeBSD [[v2.4]] == Version 2.4 (2019-02-17) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6dbdaeace..0b7a245eb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,6 +50,10 @@ set(LIB_WEECHAT_UNIT_TESTS_PLUGINS_SRC ) add_library(weechat_unit_tests_plugins MODULE ${LIB_WEECHAT_UNIT_TESTS_PLUGINS_SRC}) +if(ICONV_LIBRARY) + list(APPEND EXTRA_LIBS ${ICONV_LIBRARY}) +endif() + if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") list(APPEND EXTRA_LIBS "intl") if(HAVE_BACKTRACE)