File: Fix-missing-lboost_log-on-on-sla_tests-and-libslic3r_gui.patch

package info (click to toggle)
slic3r-prusa 2.9.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196,528 kB
  • sloc: cpp: 534,736; ansic: 71,269; yacc: 1,311; makefile: 256; lex: 241; sh: 113
file content (37 lines) | stat: -rw-r--r-- 1,433 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Chow Loong Jin <hyperair@debian.org>
Date: Mon, 23 Sep 2024 12:26:56 +0800
Subject: Fix missing -lboost_log on on sla_tests and libslic3r_gui

BOOST_LOG_TRIVIAL is used in these modules, but boost logs weren't linked so ld
throws undefined references to various boost::log:: symbols.
---
 src/slic3r/CMakeLists.txt      | 2 ++
 tests/sla_print/CMakeLists.txt | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index f938703..dabf58e 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -458,6 +458,8 @@ target_link_libraries(
     boost_headeronly
     ${CRYPTO_LIBRARIES}
     ${SSL_LIBRARIES}
+    boost_headeronly
+    boost_libs
 )
 
 if (MSVC)
diff --git a/tests/sla_print/CMakeLists.txt b/tests/sla_print/CMakeLists.txt
index e599c66..eeaaea9 100644
--- a/tests/sla_print/CMakeLists.txt
+++ b/tests/sla_print/CMakeLists.txt
@@ -13,7 +13,7 @@ add_executable(${_TEST_NAME}_tests ${_TEST_NAME}_tests_main.cpp
     sla_zcorrection_tests.cpp)
 
 # mold linker for successful linking needs also to link TBB library and link it before libslic3r.
-target_link_libraries(${_TEST_NAME}_tests test_common TBB::tbb TBB::tbbmalloc libslic3r)
+target_link_libraries(${_TEST_NAME}_tests test_common TBB::tbb TBB::tbbmalloc libslic3r boost_headeronly boost_libs)
 set_property(TARGET ${_TEST_NAME}_tests PROPERTY FOLDER "tests")
 
 if (WIN32)