]> source.dussan.org Git - tigervnc.git/commitdiff
Include gettext and zlib in static GnuTLS link
authorPierre Ossman <ossman@cendio.se>
Tue, 28 Oct 2014 15:59:02 +0000 (16:59 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 28 Oct 2014 15:59:02 +0000 (16:59 +0100)
This is needed to make sure they are always included, and in the
proper order.

cmake/StaticBuild.cmake

index 46204b55b7bc6c1c6f301484ce217d7c36a2c953..8f06a148b53f8b39794d55b7bc436fb4bb5fedf6 100644 (file)
@@ -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)