File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2582,6 +2582,16 @@ if(WOLFSSL_INSTALL)
25822582 set (includedir "\$ {prefix}/include" )
25832583 set (VERSION ${PROJECT_VERSION} )
25842584
2585+ # Setting libm in Libs.private of wolfssl.pc.
2586+ # See "Link Libraries" in above about `m` insertion to LINK_LIBRARIES
2587+ get_target_property (_wolfssl_dep_libs wolfssl LINK_LIBRARIES )
2588+ list (FIND _wolfssl_dep_libs m _dep_libm)
2589+ if ("${_dep_libm} " GREATER -1)
2590+ set (LIBM -lm)
2591+ else ()
2592+ set (LIBM)
2593+ endif ()
2594+
25852595 configure_file (support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR} /support/wolfssl.pc @ONLY )
25862596 install (FILES ${CMAKE_CURRENT_BINARY_DIR} /support/wolfssl.pc
25872597 DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig)
Original file line number Diff line number Diff line change @@ -9205,6 +9205,7 @@ AC_SUBST([AM_LDFLAGS])
92059205AC_SUBST ( [ AM_CCASFLAGS] )
92069206AC_SUBST ( [ LIB_ADD] )
92079207AC_SUBST ( [ LIB_STATIC_ADD] )
9208+ AC_SUBST ( [ LIBM] )
92089209
92099210# FINAL
92109211AC_CONFIG_FILES ( [ stamp-h] , [ echo timestamp > stamp-h] )
Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ Name: wolfssl
77Description: wolfssl C library.
88Version: @VERSION@
99Libs: -L${libdir} -lwolfssl
10+ Libs.private: @LIBM@
1011Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments