--- a/src/plugins/filecheck/CMakeLists.txt
+++ b/src/plugins/filecheck/CMakeLists.txt
-@@ -2,19 +2,45 @@ include (LibAddMacros)
- if (DEPENDENCY_PHASE)
- find_package (Iconv QUIET)
-
+@@ -1,20 +1,46 @@
+ include (LibAddMacros)
+-if (DEPENDENCY_PHASE)
+- find_package (Iconv QUIET)
+-
- if (NOT Iconv_FOUND)
- remove_plugin (filecheck "Cannot find iconv library")
- endif ()
--
++find_package (Iconv QUIET)
+
++if (DEPENDENCY_PHASE)
if (ENABLE_ASAN AND CMAKE_SYSTEM_NAME MATCHES FreeBSD)
# See also: https://cirrus-ci.com/task/5751822404288512?command=tests#L237-L239
remove_plugin (filecheck "the unit test of the plugin fails on FreeBSD if ASan is active")
+ LINK_LIBRARIES iconv
+ ADD_TEST INSTALL_TEST_DATA COMPONENT libelektra${SO_VERSION}-extra)
+ else()
-+ remove_plugin (filecheck "Cannot find iconv library")
++ message(FATAL_ERROR "Cannot find iconv library")
+ endif()
+endif()
--- a/src/plugins/iconv/CMakeLists.txt
+++ b/src/plugins/iconv/CMakeLists.txt
-@@ -5,15 +5,41 @@ if (DEPENDENCY_PHASE)
+@@ -1,19 +1,45 @@
+-if (DEPENDENCY_PHASE)
+- find_package (Iconv QUIET)
++find_package (Iconv QUIET)
+
++if (DEPENDENCY_PHASE)
+ if (ENABLE_ASAN AND CMAKE_SYSTEM_NAME MATCHES FreeBSD)
# See also: https://cirrus-ci.com/task/5751822404288512?command=tests#L253-L255
remove_plugin (iconv "the unit test of the plugin fails on FreeBSD if ASan is active")
endif (ENABLE_ASAN AND CMAKE_SYSTEM_NAME MATCHES FreeBSD)
+ LINK_LIBRARIES iconv
+ ADD_TEST TEST_README COMPONENT libelektra${SO_VERSION}-extra)
+ else()
-+ remove_plugin (iconv "Cannot find iconv library")
++ message(FATAL_ERROR "Cannot find iconv library")
+ endif()
+endif()