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} )