vcpkg/ports/fdk-aac/cxx-linkage-pkgconfig.patch
Kai Pastor 2017886818
[alsa,fdk-aac,ffmpeg,libsrt,snappy,x265] Code cleanup, fix and use pkg-config (#39077)
- Setup and use pkg-config for ffmpeg dependencies.
https://github.com/microsoft/vcpkg/pull/38011#discussion_r1623174355.
- Export actual c++ link libraries for fdk-aac via pkg-config. (Same
pattern as lerc, geos.)
- Rectify link libraries in pkg-config  for alsa, libsrt, snappy, x265.
- Burn-in dllimport for libsrt and x265.
- Pass detected STRIP to ffmpeg. Fixes
https://github.com/microsoft/vcpkg/issues/36852.
2024-06-06 00:48:31 -07:00

21 lines
649 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4db8c7e..da3297c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -528,6 +528,15 @@ if(FDK_AAC_INSTALL_PKGCONFIG_MODULE)
set(LIBS_PUBLIC "-lm")
endif()
endif()
+ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
+ continue()
+ elseif(EXISTS "${lib}")
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
+ else()
+ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
+ endif()
+ endforeach()
configure_file(fdk-aac.pc.in fdk-aac.pc @ONLY)
install(
FILES