From a11a55aeecc3b93a884edcbdd6e9b810abb68bfa Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 30 Jan 2020 14:23:24 +0100 Subject: [PATCH] Include Carbon when statically linking gettext on macOS As gettext needs some stuff from Carbon and we don't want to rely on it being pulled in as a side effect. --- cmake/StaticBuild.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 1a9dd4d..d1605fa 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -27,6 +27,9 @@ if(BUILD_STATIC) # gettext is included in libc on many unix systems if(NOT LIBC_HAS_DGETTEXT) set(GETTEXT_LIBRARIES "-Wl,-Bstatic -lintl -liconv -Wl,-Bdynamic") + if(APPLE) + set(GETTEXT_LIBRARIES "${GETTEXT_LIBRARIES} -framework Carbon") + endif() endif() if(GNUTLS_FOUND)