aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindLibIntl.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindLibIntl.cmake')
-rw-r--r--cmake/FindLibIntl.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/FindLibIntl.cmake b/cmake/FindLibIntl.cmake
index 989cb07488..5663098147 100644
--- a/cmake/FindLibIntl.cmake
+++ b/cmake/FindLibIntl.cmake
@@ -31,15 +31,13 @@ find_library(LibIntl_LIBRARY
)
if (LibIntl_INCLUDE_DIR)
- set(CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
+ list(APPEND CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
endif()
-
# On some systems (linux+glibc) libintl is passively available.
# So only specify the library if one was found.
if (LibIntl_LIBRARY)
- set(CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
endif()
-
check_c_source_compiles("
#include <libintl.h>
@@ -50,6 +48,12 @@ int main(int argc, char** argv) {
bind_textdomain_codeset(\"foo\", \"bar\");
textdomain(\"foo\");
}" HAVE_WORKING_LIBINTL)
+if (LibIntl_INCLUDE_DIR)
+ list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
+endif()
+if (LibIntl_LIBRARY)
+ list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
+endif()
if (HAVE_WORKING_LIBINTL)
# On some systems (linux+glibc) libintl is passively available.