export -lssp for static libraries (#704)

.a files in MinGW don't list the other static libraries they depend on.
We need to provide it through the pkg-config file.
This commit is contained in:
Steve Lhomme 2024-06-13 12:03:30 +02:00 committed by GitHub
parent d6204ea911
commit a0f6661beb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,9 @@ if(MINGW AND (WITH_FORTIFY_SOURCE OR WITH_STACK_PROTECTOR))
message(WARNING "Could not find libssp in MinGW, stack protection and/or FORTIFY_SOURCE are unavailable")
else()
link_libraries("ssp.a")
# static libraries don't carry over other static libraries in mingw
# we need to export it in the pkg-config
set(FLAC_STATIC_LIBS "-lssp")
endif()
elseif(NOT MSVC)
set(HAVE_LIBSSP 1)

View File

@ -8,5 +8,5 @@ Description: Free Lossless Audio Codec Library
Version: @VERSION@
Requires.private: @OGG_PACKAGE@
Libs: -L${libdir} -lFLAC
Libs.private: -lm
Libs.private: -lm @FLAC_STATIC_LIBS@
Cflags: -I${includedir}