CMake needs help finding gettext libintl libraries in environments with non-standard GCC installs.
Details
Diff Detail
- Repository
- rOLDT svn-test-suite
- Build Status
Buildable 82572 Build 111663: arc lint + arc unit
Event Timeline
Usually system introspection happens in the top-level CMakeLists.txt, but test-suite allows to selectively include subdirs, so it is a good location to do here.
If ClamAV is using gettext only, maybe use FindGettext instead?
MultiSource/Applications/ClamAV/CMakeLists.txt | ||
---|---|---|
173 | Please use find_package (also see https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules) |
The CMake documentation says to use FindIntl for the gettext libintl libraries
https://cmake.org/cmake/help/latest/module/FindIntl.html#module:FindIntl
but use FindGettext for tools (msmerge, msgfmt, etc.).
ClamAV is only using the former.
You are right, FindGettext seems to look for some commands, not the library.
Can you still do the find_package change?
MultiSource/Applications/ClamAV/CMakeLists.txt | ||
---|---|---|
173 |
This seems to have caused failures on Darwin platforms. I've pushed a fix in 48e7b34f but let me know if you disagree with the approach.
I would have done an unequal: if (NOT TARGET_OS STREQUAL "Darwin"). libIntl is part of the GNU user space environment, not the kernel, e.g. also apply to GNU/kFreeBSD.
More generally, IMHO cmake should have abstracted over this, for platforms that don't need libIntl.
Please use find_package (also see https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules)