vcpkg/ports/libsndfile/mp3lame.diff

19 lines
676 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b501f08..0932ad5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -236,6 +236,13 @@ if (INSTALL_PKGCONFIG_MODULE)
if (ENABLE_MPEG)
set (EXTERNAL_MPEG_REQUIRE "libmpg123")
set (EXTERNAL_MPEG_LIBS "-lmp3lame")
+ get_target_property(mp3lame_binary mp3lame::mp3lame IMPORTED_LOCATION_RELEASE)
+ if(mp3lame_binary MATCHES "mp3lame-static")
+ set (EXTERNAL_MPEG_LIBS "-lmp3lame-static -lmpghip-static")
+ endif()
+ if(CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "")
+ string (REPLACE "-lmp" "-llibmp" EXTERNAL_MPEG_LIBS "${EXTERNAL_MPEG_LIBS}")
+ endif()
endif ()
configure_file (sndfile.pc.in sndfile.pc @ONLY)