aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2014-02-23 14:48:03 +0100
committerashleyh <gh@ashleyh.eu>2014-02-27 19:11:48 +0000
commite728ce95ef2631a662940757ef11544881b895a2 (patch)
tree03f1a165ce17e18982d49b41e852a446bcd3f9a7 /src
parentf26b0aa88cee6c3d1aababd81e3d8de20f4af283 (diff)
downloadrneovim-e728ce95ef2631a662940757ef11544881b895a2.tar.gz
rneovim-e728ce95ef2631a662940757ef11544881b895a2.tar.bz2
rneovim-e728ce95ef2631a662940757ef11544881b895a2.zip
Use GNU gettext from homebrew on Mac if available
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
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)