anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / misc / bambu-studio / patches / 0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
blob15f1bf8f0b59e1ac7763948e3be774631870b3dc
1 From 7eed499898226222a949a792e0400ec10db4a1c9 Mon Sep 17 00:00:00 2001
2 From: Zhaofeng Li <hello@zhaofeng.li>
3 Date: Tue, 22 Nov 2022 13:00:39 -0700
4 Subject: [PATCH] [not for upstream] CMakeLists: Link against webkit2gtk in
5 libslic3r_gui
7 WebView.cpp uses symbols from webkitgtk directly. Upstream setup
8 links wxGTK statically so webkitgtk is already pulled in.
10 > /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: slic3r/liblibslic3r_gui.a(WebView.cpp.o): undefined reference to symbol 'webkit_web_view_run_javascript_finish'
11 > /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/8yvy428jy2nwq4dhmrcs7gj5r27a2pv6-webkitgtk-2.38.2+abi=4.0/lib/libwebkit2gtk-4.0.so.37: error adding symbols: DSO missing from command line
12 ---
13 src/CMakeLists.txt | 5 +++++
14 1 file changed, 5 insertions(+)
16 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
17 index 9c5cb96..e92a0e3 100644
18 --- a/src/CMakeLists.txt
19 +++ b/src/CMakeLists.txt
20 @@ -175,6 +175,11 @@ if (WIN32)
21 target_link_libraries(BambuStudio_app_gui PRIVATE boost_headeronly)
22 endif ()
24 +# We link against webkit2gtk symbols in src/slic3r/GUI/Widgets/WebView.cpp
25 +if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
26 + target_link_libraries(libslic3r_gui "-lwebkit2gtk-4.0")
27 +endif ()
29 # Link the resources dir to where Slic3r GUI expects it
30 set(output_dlls_Release "")
31 set(output_dlls_Debug "")
32 --
33 2.38.1