Include gettext and zlib in static GnuTLS link
This is needed to make sure they are always included, and in the
proper order.
diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake
index 46204b5..8f06a14 100644
--- a/cmake/StaticBuild.cmake
+++ b/cmake/StaticBuild.cmake
@@ -51,6 +51,15 @@
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)