From ad4ab5f4bef6accc5c662e51863bc6e0e372a2f1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 16 Aug 2007 12:05:50 +0000 Subject: [PATCH] The C bindings use the C++ library which uses the C++ runtime. On Solaris, this doesn't automatically mean that applications linking to the C bindings get the C++ runtime; add the C++ runtime explicitly to the bindings library so that the runtime gets pulled in by apps. aka. make-it-link. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@700769 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- bindings/c/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt index 5f08c65a..6f156714 100644 --- a/bindings/c/CMakeLists.txt +++ b/bindings/c/CMakeLists.txt @@ -21,6 +21,14 @@ ADD_LIBRARY(tag_c SHARED ${tag_c_LIB_SRCS}) TARGET_LINK_LIBRARIES(tag_c tag ) +# On Solaris we need to explicitly add the C++ standard and runtime +# libraries to the libs used by this library, to link them to apps +# using these bindings. +CHECK_LIBRARY_EXISTS(Crun __RTTI___ "" HAVE_CRUN_LIB) +IF(HAVE_CRUN_LIB) + TARGET_LINK_LIBRARIES(tag_c Cstd Crun) +ENDIF(HAVE_CRUN_LIB) + SET_TARGET_PROPERTIES(tag_c PROPERTIES VERSION 0.0.0 SOVERSION 0 ) INSTALL(TARGETS tag_c DESTINATION ${LIB_INSTALL_DIR} )