From 5b9303a697ffc056a337a4da42c8bea8942a7dd1 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 28 Oct 2014 16:59:02 +0100 Subject: [PATCH] Include gettext and zlib in static GnuTLS link This is needed to make sure they are always included, and in the proper order. --- cmake/StaticBuild.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 46204b55..8f06a148 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -51,6 +51,15 @@ if(BUILD_STATIC) if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lrt") endif() + + # GnuTLS uses gettext and zlib, so make sure those are always + # included and in the proper order + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${ZLIB_LIBRARIES}") + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${GETTEXT_LIBRARIES}") + + # The last variables might introduce whitespace, which CMake + # throws a hissy fit about + string(STRIP ${GNUTLS_LIBRARIES} GNUTLS_LIBRARIES) endif() if(FLTK_FOUND) -- 2.39.5