Homebrew installs gettext (including libintl, which GLib requires) in
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 10 Sep 2013 21:24:52 +0000 (21:24 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 10 Sep 2013 21:24:52 +0000 (21:24 +0000)
/usr/local/opt/gettext. Tell CMake to update our include and library
paths accordingly.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@51943 f5534014-38df-0310-8fa8-9805f1628bb7

CMakeLists.txt

index 2991099b1f0fc75915d910d01e95f4789d510599..9a1020340a51a285eef9d0ff9f8d9ef8773619e7 100644 (file)
@@ -280,6 +280,13 @@ else()
   set(LINK_MODE_MODULE MODULE)
 endif()
 
+if(APPLE AND EXISTS /usr/local/opt/gettext)
+       # GLib on OS X requires libintl. Homebrew installs gettext (and
+       # libintl) in /usr/local/opt/gettext
+       include_directories(/usr/local/opt/gettext/include)
+       link_directories(/usr/local/opt/gettext/lib)
+endif()
+
 # The packagelist is doing some magic:  If we add XXX to the packagelist, we
 # - may optionally set XXX_OPTIONS to pass to the find_package command
 # - will call FindXXX.cmake