diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3a4fe1e1..f133e2532 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,6 @@ if (SLIC3R_GUI) elseif (APPLE) target_link_libraries(slic3r "-framework OpenGL") else () - target_link_libraries(slic3r -lGL -lGLU) + target_link_libraries(slic3r -ldl -lGL -lGLU) endif () endif () diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 8756d98eb..3f37213ae 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -109,7 +109,8 @@ target_link_libraries(XS ${Boost_LIBRARIES}) if (APPLE) # add_compile_options(-stdlib=libc++) # add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) - target_link_libraries(XS "-framework IOKit" "-framework CoreFoundation" -lc++) + # -liconv: boost links to libiconv by default + target_link_libraries(XS "-liconv -framework IOKit" "-framework CoreFoundation" -lc++) elseif (MSVC) target_link_libraries(XS ) else () @@ -142,14 +143,6 @@ if (WIN32) target_link_libraries(XS ${PERL_LIBRARY}) endif() -# Find and configure boost -if(SLIC3R_STATIC) - # Use static boost libraries. - set(Boost_USE_STATIC_LIBS ON) - # Use boost libraries linked statically to the C++ runtime. - # set(Boost_USE_STATIC_RUNTIME ON) -endif() - target_link_libraries(XS ${Boost_LIBRARIES}) target_link_libraries(XS ${TBB_LIBRARIES}) # target_link_libraries(XS ${wxWidgets_LIBRARIES})