summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--cmake/FindGettext.cmake4
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 4190eeedd..bd4babd87 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -62,6 +62,7 @@ Tests::
Build::
+ * core: fix detection of gettext headers on Darwin (issue #2031)
* core: make libintl.h required if CMake option ENABLE_NLS is enabled (issue #2031)
[[v4.1.2]]
diff --git a/cmake/FindGettext.cmake b/cmake/FindGettext.cmake
index 2460e190b..e2222ee9c 100644
--- a/cmake/FindGettext.cmake
+++ b/cmake/FindGettext.cmake
@@ -43,6 +43,10 @@ find_path(LIBINTL_INCLUDE
set(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(CMAKE_REQUIRED_FLAGS "-lintl")
+endif()
+
check_include_files(libintl.h HAVE_LIBINTL_H)
if(NOT HAVE_LIBINTL_H)