Don't probe libintl if it wasn't found
It just makes CMake error out rather than continue without NLS
support.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 773556a..e9b20a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,10 +151,12 @@
set(GETTEXT_FOUND TRUE)
else()
find_library(LIBINTL_LIBRARY NAMES intl libintl)
- check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
- if(LIBINTL_HAS_DGETTEXT)
- set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY} ${ICONV_LIBRARIES})
- set(GETTEXT_FOUND TRUE)
+ if(LIBINTL_LIBRARY)
+ check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
+ if(LIBINTL_HAS_DGETTEXT)
+ set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY} ${ICONV_LIBRARIES})
+ set(GETTEXT_FOUND TRUE)
+ endif()
endif()
endif()
set(CMAKE_REQUIRED_LIBRARIES)