From 95db76e28091b62645014d64f1b555c83d54ad4b Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Mon, 24 Feb 2014 22:22:56 -0500 Subject: Improve libintl detection and linking. This makes it so that a self-installed libintl is now detected and used. It also attempts to locate a homebrew version of the library, if that exists. --- src/CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b00076e04..119e38ed96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,15 +40,8 @@ else() endif() endif() -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() +if (HAVE_LIBINTL AND LIBINTL_LIB) + target_link_libraries(vim ${LIBINTL_LIB}) endif() include_directories ("${PROJECT_SOURCE_DIR}/src/proto") -- cgit