diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f869be44..3e59090e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() + + # Boost on Raspberry-Pi does not link to pthreads. + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) endif() if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45d6f8196..136fe9af7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,8 @@ elseif (MSVC) # Manifest is provided through slic3r.rc, don't generate your own. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") else () - target_link_libraries(slic3r ${CMAKE_DL_LIBS} -lstdc++) + # Boost on Raspberry-Pi does not link to pthreads explicitely. + target_link_libraries(slic3r ${CMAKE_DL_LIBS} -lstdc++ Threads::Threads) endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.