|
| 1 | +From 6726ebef3eec9dcc9d08b2ad6ae352bacb215e5e Mon Sep 17 00:00:00 2001 |
| 2 | +From: Steve Lhomme < [email protected]> |
| 3 | +Date: Mon, 5 Sep 2022 16:13:05 +0200 |
| 4 | +Subject: [PATCH 2/2] add the C++ runtime to the packages to link to |
| 5 | + |
| 6 | +gcc needs libstdc++ and clang needs libc++. |
| 7 | +--- |
| 8 | + CMakeLists.txt | 15 +++++++++++++++ |
| 9 | + 1 file changed, 15 insertions(+) |
| 10 | + |
| 11 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 12 | +index 0dbd9bd..67fa620 100644 |
| 13 | +--- a/CMakeLists.txt |
| 14 | ++++ b/CMakeLists.txt |
| 15 | +@@ -197,6 +197,21 @@ else() |
| 16 | + endif() |
| 17 | + |
| 18 | + if(NOT BUILD_FRAMEWORK) |
| 19 | ++ foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}) |
| 20 | ++ if (LIB MATCHES "-l.*") |
| 21 | ++ list(APPEND PKG_CXX_LIBS "${LIB}") |
| 22 | ++ else() |
| 23 | ++ list(APPEND PKG_CXX_LIBS "-l${LIB}") |
| 24 | ++ endif() |
| 25 | ++ endforeach() |
| 26 | ++ if(PKG_CXX_LIBS) |
| 27 | ++ # Blacklist for MinGW-w64 |
| 28 | ++ list(REMOVE_ITEM PKG_CXX_LIBS |
| 29 | ++ "-lmingw32" "-lgcc_s" "-lgcc" "-lmoldname" "-lmingwex" "-lmingwthrd" |
| 30 | ++ "-lmsvcrt" "-lpthread" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32") |
| 31 | ++ string(REPLACE ";" " " PKG_LIBS "${PKG_CXX_LIBS}") |
| 32 | ++ set(CHROMAPRINT_ADDITIONAL_LIBS "${CHROMAPRINT_ADDITIONAL_LIBS} ${PKG_LIBS}") |
| 33 | ++ endif() |
| 34 | + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libchromaprint.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc) |
| 35 | + install( |
| 36 | + FILES ${CMAKE_CURRENT_BINARY_DIR}/libchromaprint.pc |
| 37 | +-- |
| 38 | +2.27.0.windows.1 |
| 39 | + |
0 commit comments