From e728ce95ef2631a662940757ef11544881b895a2 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 23 Feb 2014 14:48:03 +0100 Subject: Use GNU gettext from homebrew on Mac if available --- src/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6918aee61a..3b00076e04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,6 +40,17 @@ else() endif() endif() -include_directories ("${PROJECT_SOURCE_DIR}/src/proto") +if (CMAKE_HOST_APPLE AND HAVE_WORKING_LIBINTL) + check_library_exists(intl gettext "${HOMEBREW_GETTEXT_PREFIX}/lib" HAVE_LIBINTL) + if (HAVE_LIBINTL) + include_directories("${HOMEBREW_GETTEXT_PREFIX}/include") + find_library(INTL_LIBRARY NAMES intl PATHS "${HOMEBREW_GETTEXT_PREFIX}/lib") + target_link_libraries(vim ${INTL_LIBRARY}) + else() + message(FATAL_ERROR "can't find something resembling -lintl") + endif() +endif() + +include_directories ("${PROJECT_SOURCE_DIR}/src/proto") install(TARGETS nvim RUNTIME DESTINATION bin) -- cgit