diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2014-11-03 23:37:48 -0500 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2014-11-03 23:37:48 -0500 |
commit | 2773ff93719b1781366a7ef0d057bdd730c38d5e (patch) | |
tree | 10e28b9d378ac89d7ab689d4ff957cde01bab3a8 /cmake | |
parent | e20370827bf9441c91de0baeb696a4cf9d6f75a6 (diff) | |
download | tigervnc-2773ff93719b1781366a7ef0d057bdd730c38d5e.tar.gz tigervnc-2773ff93719b1781366a7ef0d057bdd730c38d5e.zip |
Static build fix - only attempt to link against libtasn1 if it's present
GnuTLS may be compiled without external libtasn1, so we shouldn't try
to link against it unless it's actually present.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/StaticBuild.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 5800a078..84fe0a8e 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -30,9 +30,14 @@ if(BUILD_STATIC) HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle libnettle HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) + FIND_LIBRARY(TASN1_LIBRARY NAMES tasn1 libtasn1 + HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) - set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls -ltasn1") + set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls") + if(TASN1_LIBRARY) + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -ltasn1") + endif() if(NETTLE_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lnettle -lhogweed -lgmp -lcrypt32") endif() |