[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: chromaprint: use CMAKE_CXX_IMPLICIT_LINK_LIBRARIES to get the C++ runtime
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Sep 7 06:41:12 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7a772424 by Steve Lhomme at 2022-09-07T06:03:21+00:00
contrib: chromaprint: use CMAKE_CXX_IMPLICIT_LINK_LIBRARIES to get the C++ runtime
Submitted upstream https://github.com/acoustid/chromaprint/pull/119
- - - - -
4c362388 by Steve Lhomme at 2022-09-07T06:03:21+00:00
chromaprint: remove dummy.cpp
We provide the proper C++ runtime in our pkg-config files. If it comes from the
system it should either be a dynamic library (likely) or a static library that
should do it as well. Otherwise it's the problem of the system maintainers.
- - - - -
3 changed files:
- + contrib/src/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
- contrib/src/chromaprint/rules.mak
- modules/stream_out/Makefile.am
Changes:
=====================================
contrib/src/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
=====================================
@@ -0,0 +1,39 @@
+From 6726ebef3eec9dcc9d08b2ad6ae352bacb215e5e Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 5 Sep 2022 16:13:05 +0200
+Subject: [PATCH 2/2] add the C++ runtime to the packages to link to
+
+gcc needs libstdc++ and clang needs libc++.
+---
+ CMakeLists.txt | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0dbd9bd..67fa620 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -197,6 +197,21 @@ else()
+ endif()
+
+ if(NOT BUILD_FRAMEWORK)
++ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
++ if (LIB MATCHES "-l.*")
++ list(APPEND PKG_CXX_LIBS "${LIB}")
++ else()
++ list(APPEND PKG_CXX_LIBS "-l${LIB}")
++ endif()
++ endforeach()
++ if(PKG_CXX_LIBS)
++ # Blacklist for MinGW-w64
++ list(REMOVE_ITEM PKG_CXX_LIBS
++ "-lmingw32" "-lgcc_s" "-lgcc" "-lmoldname" "-lmingwex" "-lmingwthrd"
++ "-lmsvcrt" "-lpthread" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32")
++ string(REPLACE ";" " " PKG_LIBS "${PKG_CXX_LIBS}")
++ set(CHROMAPRINT_ADDITIONAL_LIBS "${CHROMAPRINT_ADDITIONAL_LIBS} ${PKG_LIBS}")
++ endif()
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libchromaprint.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc)
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc
+--
+2.27.0.windows.1
+
=====================================
contrib/src/chromaprint/rules.mak
=====================================
@@ -16,6 +16,7 @@ $(TARBALLS)/chromaprint-$(CHROMAPRINT_VERSION).tar.gz:
chromaprint: chromaprint-$(CHROMAPRINT_VERSION).tar.gz .sum-chromaprint
$(UNPACK)
$(APPLY) $(SRC)/chromaprint/linklibs.patch
+ $(APPLY) $(SRC)/chromaprint/0002-add-the-C-runtime-to-the-packages-to-link-to.patch
$(MOVE)
DEPS_chromaprint = ffmpeg $(DEPS_ffmpeg)
=====================================
modules/stream_out/Makefile.am
=====================================
@@ -103,7 +103,7 @@ libstream_out_rtp_plugin_la_LIBADD += $(SRTP_LIBS) $(GCRYPT_LIBS)
endif
# Chromaprint plugin
-libstream_out_chromaprint_plugin_la_SOURCES = stream_out/chromaprint.c stream_out/chromaprint_data.h dummy.cpp
+libstream_out_chromaprint_plugin_la_SOURCES = stream_out/chromaprint.c stream_out/chromaprint_data.h
libstream_out_chromaprint_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CHROMAPRINT_CFLAGS)
libstream_out_chromaprint_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(soutdir)'
libstream_out_chromaprint_plugin_la_LIBADD = $(CHROMAPRINT_LIBS)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8d5c08159eb3907014d9ddf05aff4f953ea4b90c...4c362388898115fb0cbf797c1ed0cdb401760a08
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8d5c08159eb3907014d9ddf05aff4f953ea4b90c...4c362388898115fb0cbf797c1ed0cdb401760a08
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list