FindIntl finds headers but not library on macOS when Mono is installed
CMake 3.13.2 macOS 10.13.6
Our project uses find_package(Intl)
to pick up the message translation library.
I and at least one other person have got Mono installed, probably thanks to Visual Studio for Mac. This installs a number of libraries in /Library/Frameworks
.
FindIntl successfully finds the libintl.h
header in /Library/Frameworks/Mono.framework/Headers (although I'm not really sure why it's looking there), but does not find the library in /Library/Frameworks/Mono.framework/Libraries, leading to compilation failure:
[100%] Linking CXX executable fish
Undefined symbols for architecture x86_64:
"_libintl_bindtextdomain", referenced from:
fish_bindtextdomain(char const*, char const*) in libfishlib.a(fallback.cpp.o)
"_libintl_gettext", referenced from:
fish_gettext(char const*) in libfishlib.a(fallback.cpp.o)
"_libintl_textdomain", referenced from:
fish_textdomain(char const*) in libfishlib.a(fallback.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't think find_path
should be looking in /Library/Frameworks/Mono.framework, but if it's going to then should find_library
be searching the same set of paths?