FindIntl: support for gettext installed with brew

pull/231/head
Hleb Valoshka 2019-02-07 23:52:20 +03:00
parent a185a83373
commit 0fc5edf500
1 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,19 @@
# Written by Roger Leigh <rleigh@codelibre.net>
# brew support is by Alexis Hildebrandt <https://github.com/afh>
# Append custom gettext path to CMAKE_PREFIX_PATH
# if installed via Mac Hombrew
if(APPLE)
find_program(HOMEBREW_PROG brew)
if(EXISTS ${HOMEBREW_PROG})
execute_process(COMMAND ${HOMEBREW_PROG} --prefix gettext
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE HOMEBREW_GETTEXT_PREFIX)
list(APPEND CMAKE_PREFIX_PATH "${HOMEBREW_GETTEXT_PREFIX}")
endif()
endif()
# Find include directory
find_path(Intl_INCLUDE_DIR