From d07b3fb08b5f8e81899a4772f8219fde49ef2126 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 12 Jun 2019 10:00:51 +0200 Subject: [PATCH 1/5] Bed shape dialog refactoring --- src/slic3r/GUI/2DBed.cpp | 67 +++++++++---------------------- src/slic3r/GUI/2DBed.hpp | 15 +++---- src/slic3r/GUI/BedShapeDialog.cpp | 18 ++++----- src/slic3r/GUI/BedShapeDialog.hpp | 7 ++-- src/slic3r/GUI/Tab.cpp | 32 +++++++++------ 5 files changed, 57 insertions(+), 82 deletions(-) diff --git a/src/slic3r/GUI/2DBed.cpp b/src/slic3r/GUI/2DBed.cpp index ce2012461..a339f3e66 100644 --- a/src/slic3r/GUI/2DBed.cpp +++ b/src/slic3r/GUI/2DBed.cpp @@ -19,8 +19,6 @@ wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(25 * wxGetApp().em_unit(), - m_user_drawn_background = false; #endif /*__APPLE__*/ Bind(wxEVT_PAINT, ([this](wxPaintEvent &/* e */) { repaint(); })); - Bind(wxEVT_LEFT_DOWN, ([this](wxMouseEvent &event) { mouse_event(event); })); - Bind(wxEVT_MOTION, ([this](wxMouseEvent &event) { mouse_event(event); })); Bind(wxEVT_SIZE, ([this](wxSizeEvent & /* e */) { Refresh(); })); } void Bed_2D::repaint() @@ -43,22 +41,14 @@ void Bed_2D::repaint() dc.DrawRectangle(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight()); } - // turn cw and ch from sizes to max coordinates - cw--; - ch--; + if (m_bed_shape.empty()) + return; + + // reduce size to have some space around the drawn shape + cw -= (2 * Border); + ch -= (2 * Border); auto cbb = BoundingBoxf(Vec2d(0, 0),Vec2d(cw, ch)); - // leave space for origin point - cbb.min(0) += 4; - cbb.max -= Vec2d(4., 4.); - - // leave space for origin label - cbb.max(1) -= 13; - - // read new size - cw = cbb.size()(0); - ch = cbb.size()(1); - auto ccenter = cbb.center(); // get bounding box of bed shape in G - code coordinates @@ -76,17 +66,17 @@ void Bed_2D::repaint() ccenter(0) - bcenter(0) * sfactor, ccenter(1) - bcenter(1) * sfactor ); + m_scale_factor = sfactor; - m_shift = Vec2d(shift(0) + cbb.min(0), - shift(1) - (cbb.max(1) - GetSize().GetHeight())); + m_shift = Vec2d(shift(0) + cbb.min(0), shift(1) - (cbb.max(1) - ch)); // draw bed fill dc.SetBrush(wxBrush(wxColour(255, 255, 255), wxBRUSHSTYLE_SOLID)); wxPointList pt_list; for (auto pt: m_bed_shape) { - Point pt_pix = to_pixels(pt); - pt_list.push_back(new wxPoint(pt_pix(0), pt_pix(1))); + Point pt_pix = to_pixels(pt, ch); + pt_list.push_back(new wxPoint(pt_pix(0), pt_pix(1))); } dc.DrawPolygon(&pt_list, 0, 0); @@ -105,9 +95,9 @@ void Bed_2D::repaint() for (auto pl : polylines) { for (size_t i = 0; i < pl.points.size()-1; i++) { - Point pt1 = to_pixels(unscale(pl.points[i])); - Point pt2 = to_pixels(unscale(pl.points[i+1])); - dc.DrawLine(pt1(0), pt1(1), pt2(0), pt2(1)); + Point pt1 = to_pixels(unscale(pl.points[i]), ch); + Point pt2 = to_pixels(unscale(pl.points[i + 1]), ch); + dc.DrawLine(pt1(0), pt1(1), pt2(0), pt2(1)); } } @@ -116,7 +106,7 @@ void Bed_2D::repaint() dc.SetBrush(wxBrush(wxColour(0, 0, 0), wxBRUSHSTYLE_TRANSPARENT)); dc.DrawPolygon(&pt_list, 0, 0); - auto origin_px = to_pixels(Vec2d(0, 0)); + auto origin_px = to_pixels(Vec2d(0, 0), ch); // draw axes auto axes_len = 50; @@ -153,7 +143,7 @@ void Bed_2D::repaint() // draw current position if (m_pos!= Vec2d(0, 0)) { - auto pos_px = to_pixels(m_pos); + auto pos_px = to_pixels(m_pos, ch); dc.SetPen(wxPen(wxColour(200, 0, 0), 2, wxPENSTYLE_SOLID)); dc.SetBrush(wxBrush(wxColour(200, 0, 0), wxBRUSHSTYLE_TRANSPARENT)); dc.DrawCircle(pos_px(0), pos_px(1), 5); @@ -161,35 +151,14 @@ void Bed_2D::repaint() dc.DrawLine(pos_px(0) - 15, pos_px(1), pos_px(0) + 15, pos_px(1)); dc.DrawLine(pos_px(0), pos_px(1) - 15, pos_px(0), pos_px(1) + 15); } - - m_painted = true; } + // convert G - code coordinates into pixels -Point Bed_2D::to_pixels(Vec2d point) +Point Bed_2D::to_pixels(Vec2d point, int height) { auto p = point * m_scale_factor + m_shift; - return Point(p(0), GetSize().GetHeight() - p(1)); -} - -void Bed_2D::mouse_event(wxMouseEvent event) -{ - if (!m_interactive) return; - if (!m_painted) return; - - auto pos = event.GetPosition(); - auto point = to_units(Point(pos.x, pos.y)); - if (event.LeftDown() || event.Dragging()) { - if (m_on_move) - m_on_move(point) ; - Refresh(); - } -} - -// convert pixels into G - code coordinates -Vec2d Bed_2D::to_units(Point point) -{ - return (Vec2d(point(0), GetSize().GetHeight() - point(1)) - m_shift) * (1. / m_scale_factor); + return Point(p(0) + Border, height - p(1) + Border); } void Bed_2D::set_pos(Vec2d pos) diff --git a/src/slic3r/GUI/2DBed.hpp b/src/slic3r/GUI/2DBed.hpp index 579ef4445..a61fb313d 100644 --- a/src/slic3r/GUI/2DBed.hpp +++ b/src/slic3r/GUI/2DBed.hpp @@ -9,20 +9,17 @@ namespace GUI { class Bed_2D : public wxPanel { + static const int Border = 10; + bool m_user_drawn_background = true; - bool m_painted = false; - bool m_interactive = false; - double m_scale_factor; + double m_scale_factor; Vec2d m_shift = Vec2d::Zero(); Vec2d m_pos = Vec2d::Zero(); - std::function m_on_move = nullptr; - Point to_pixels(Vec2d point); - Vec2d to_units(Point point); - void repaint(); - void mouse_event(wxMouseEvent event); - void set_pos(Vec2d pos); + Point to_pixels(Vec2d point, int height); + void repaint(); + void set_pos(Vec2d pos); public: Bed_2D(wxWindow* parent); diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp index d471a46c9..cec0f5067 100644 --- a/src/slic3r/GUI/BedShapeDialog.cpp +++ b/src/slic3r/GUI/BedShapeDialog.cpp @@ -30,11 +30,9 @@ void BedShapeDialog::build_dialog(ConfigOptionPoints* default_pt) SetMinSize(GetSize()); main_sizer->SetSizeHints(this); - // needed to actually free memory - this->Bind(wxEVT_CLOSE_WINDOW, ([this](wxCloseEvent e) { - EndModal(wxID_OK); - Destroy(); - })); + this->Bind(wxEVT_CLOSE_WINDOW, ([this](wxCloseEvent& evt) { + EndModal(wxID_CANCEL); + })); } void BedShapeDialog::on_dpi_changed(const wxRect &suggested_rect) @@ -135,7 +133,7 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt) // Called from the constructor. // Create a panel for a rectangular / circular / custom bed shape. -ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(wxString title) +ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(const wxString& title) { auto panel = new wxPanel(m_shape_options_book); @@ -305,8 +303,9 @@ void BedShapePanel::update_shape() } m_canvas->m_bed_shape = points; } + else if (page_idx == SHAPE_CUSTOM) + m_canvas->m_bed_shape = m_loaded_bed_shape; -// $self->{on_change}->(); update_preview(); } @@ -351,8 +350,9 @@ void BedShapePanel::load_stl() std::vector points; for (auto pt : polygon.points) points.push_back(unscale(pt)); - m_canvas->m_bed_shape = points; - update_preview(); + + m_loaded_bed_shape = points; + update_shape(); } } // GUI diff --git a/src/slic3r/GUI/BedShapeDialog.hpp b/src/slic3r/GUI/BedShapeDialog.hpp index 72e50a05d..6600a1c84 100644 --- a/src/slic3r/GUI/BedShapeDialog.hpp +++ b/src/slic3r/GUI/BedShapeDialog.hpp @@ -16,7 +16,8 @@ namespace GUI { using ConfigOptionsGroupShp = std::shared_ptr; class BedShapePanel : public wxPanel { - Bed_2D* m_canvas; + Bed_2D* m_canvas; + std::vector m_loaded_bed_shape; public: BedShapePanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) {} @@ -24,8 +25,8 @@ public: void build_panel(ConfigOptionPoints* default_pt); - ConfigOptionsGroupShp init_shape_options_page(wxString title); - void set_shape(ConfigOptionPoints* points); + ConfigOptionsGroupShp init_shape_options_page(const wxString& title); + void set_shape(ConfigOptionPoints* points); void update_preview(); void update_shape(); void load_stl(); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 6cd270e5b..6cd32d397 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1854,13 +1854,17 @@ void TabPrinter::build_fff() btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e) { - auto dlg = new BedShapeDialog(this); - dlg->build_dialog(m_config->option("bed_shape")); - if (dlg->ShowModal() == wxID_OK) { - load_key_value("bed_shape", dlg->GetValue()); - update_changed_ui(); - } - })); + BedShapeDialog dlg(this); + dlg.build_dialog(m_config->option("bed_shape")); + if (dlg.ShowModal() == wxID_OK) { + std::vector shape = dlg.GetValue(); + if (!shape.empty()) + { + load_key_value("bed_shape", shape); + update_changed_ui(); + } + } + })); return sizer; }; @@ -2056,11 +2060,15 @@ void TabPrinter::build_sla() btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e) { - auto dlg = new BedShapeDialog(this); - dlg->build_dialog(m_config->option("bed_shape")); - if (dlg->ShowModal() == wxID_OK) { - load_key_value("bed_shape", dlg->GetValue()); - update_changed_ui(); + BedShapeDialog dlg(this); + dlg.build_dialog(m_config->option("bed_shape")); + if (dlg.ShowModal() == wxID_OK) { + std::vector shape = dlg.GetValue(); + if (!shape.empty()) + { + load_key_value("bed_shape", shape); + update_changed_ui(); + } } })); From abdb5c5d742f17457f5fe0bec572f1fa668e6344 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 11 Jun 2019 09:59:33 +0200 Subject: [PATCH 2/5] Fixed conflicts after git cherry-picking 39cfe819daeb7dd71bae5ff20edfbe6396dffbe8 --- src/slic3r/GUI/Selection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index ff994c32d..480b59ba0 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -296,6 +296,9 @@ void Selection::clear() if (!m_valid) return; + if (m_list.empty()) + return; + for (unsigned int i : m_list) { (*m_volumes)[i]->selected = false; From 7bfb0aaac0a8f6ba257610a12347247a6621dbb8 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 13 Jun 2019 08:38:49 +0200 Subject: [PATCH 3/5] Fixed method Camera::get_dir_forward() --- src/slic3r/GUI/Camera.hpp | 2 +- src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Camera.hpp b/src/slic3r/GUI/Camera.hpp index 6e1b539ab..adb148807 100644 --- a/src/slic3r/GUI/Camera.hpp +++ b/src/slic3r/GUI/Camera.hpp @@ -56,7 +56,7 @@ public: Vec3d get_dir_right() const { return m_view_matrix.matrix().block(0, 0, 3, 3).row(0); } Vec3d get_dir_up() const { return m_view_matrix.matrix().block(0, 0, 3, 3).row(1); } - Vec3d get_dir_forward() const { return m_view_matrix.matrix().block(0, 0, 3, 3).row(2); } + Vec3d get_dir_forward() const { return -m_view_matrix.matrix().block(0, 0, 3, 3).row(2); } Vec3d get_position() const { return m_view_matrix.matrix().block(0, 3, 3, 1); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index d118a6877..72db3a9dd 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -550,7 +550,7 @@ bool GLGizmoSlaSupports::gizmo_event(SLAGizmoEventType action, const Vec2d& mous const Selection& selection = m_parent.get_selection(); const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin()); const Transform3d& instance_matrix_no_translation_no_scaling = volume->get_instance_transformation().get_matrix(true,false,true); - Vec3f direction_to_camera = camera.get_dir_forward().cast(); + Vec3f direction_to_camera = -camera.get_dir_forward().cast(); Vec3f direction_to_camera_mesh = (instance_matrix_no_translation_no_scaling.inverse().cast() * direction_to_camera).normalized().eval(); Vec3f scaling = volume->get_instance_scaling_factor().cast(); direction_to_camera_mesh = Vec3f(direction_to_camera_mesh(0)*scaling(0), direction_to_camera_mesh(1)*scaling(1), direction_to_camera_mesh(2)*scaling(2)); From 9805417028c142784900ec5efbca9cd7f150c80b Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 13 Jun 2019 08:47:38 +0200 Subject: [PATCH 4/5] Fixed method Camera::get_position() --- src/slic3r/GUI/Camera.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Camera.hpp b/src/slic3r/GUI/Camera.hpp index adb148807..1c75ef4b6 100644 --- a/src/slic3r/GUI/Camera.hpp +++ b/src/slic3r/GUI/Camera.hpp @@ -58,7 +58,7 @@ public: Vec3d get_dir_up() const { return m_view_matrix.matrix().block(0, 0, 3, 3).row(1); } Vec3d get_dir_forward() const { return -m_view_matrix.matrix().block(0, 0, 3, 3).row(2); } - Vec3d get_position() const { return m_view_matrix.matrix().block(0, 3, 3, 1); } + Vec3d get_position() const { return m_view_matrix.matrix().inverse().block(0, 3, 3, 1); } void apply_viewport(int x, int y, unsigned int w, unsigned int h) const; void apply_view_matrix() const; From 821ca0e36a4d85d19ca01b404967f53672b5625f Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 13 Jun 2019 13:15:10 +0200 Subject: [PATCH 5/5] Build fix when boost is not in prefix/boost --- CMakeLists.txt | 39 +++++++++++++------ src/CMakeLists.txt | 4 +- src/admesh/CMakeLists.txt | 2 +- src/boost/CMakeLists.txt | 2 +- .../libnest2d/backends/clipper/CMakeLists.txt | 4 +- src/libslic3r/CMakeLists.txt | 3 +- src/slic3r/GUI/ProgressStatusBar.hpp | 1 + xs/CMakeLists.txt | 12 ------ 8 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de435813d..b4e0224f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,17 +240,34 @@ if(NOT WIN32) set(MINIMUM_BOOST_VERSION "1.64.0") endif() find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS system filesystem thread log locale regex) -if(Boost_FOUND) -# message("Boost include dir: ${Boost_INCLUDE_DIRS}") -# message("Boost library dirs: ${Boost_LIBRARY_DIRS}") -# message("Boost libraries: ${Boost_LIBRARIES}") - if (APPLE) - # BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339 - add_definitions(-DBOOST_ASIO_DISABLE_KQUEUE) - endif() - if(NOT SLIC3R_STATIC) - add_definitions(-DBOOST_LOG_DYN_LINK) - endif() + +add_library(boost_libs INTERFACE) +add_library(boost_headeronly INTERFACE) + +if (APPLE) + # BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339 + target_compile_definitions(boost_headeronly INTERFACE BOOST_ASIO_DISABLE_KQUEUE) +endif() + +if(NOT SLIC3R_STATIC) + target_compile_definitions(boost_headeronly INTERFACE BOOST_LOG_DYN_LINK) +endif() + +if(TARGET Boost::system) + message(STATUS "Boost::boost exists") + target_link_libraries(boost_headeronly INTERFACE Boost::boost) + target_link_libraries(boost_libs INTERFACE + boost_headeronly # includes the custom compile definitions as well + Boost::system + Boost::filesystem + Boost::thread + Boost::log + Boost::locale + Boost::regex + ) +else() + target_include_directories(boost_headeronly INTERFACE ${Boost_INCLUDE_DIRS}) + target_link_libraries(boost_libs INTERFACE boost_headeronly ${Boost_LIBRARIES}) endif() # Find and configure intel-tbb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f2483eca..724063466 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -139,7 +139,7 @@ if (MSVC) target_compile_definitions(PrusaSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE) add_dependencies(PrusaSlicer_app_gui PrusaSlicer) set_target_properties(PrusaSlicer_app_gui PROPERTIES OUTPUT_NAME "prusa-slicer") - target_include_directories(PrusaSlicer_app_gui SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) + target_link_libraries(PrusaSlicer_app_gui PRIVATE boost_headeronly) add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc) # Generate debug symbols even in release mode. @@ -147,7 +147,7 @@ if (MSVC) target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE) add_dependencies(PrusaSlicer_app_console PrusaSlicer) set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console") - target_include_directories(PrusaSlicer_app_console SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) + target_link_libraries(PrusaSlicer_app_console PRIVATE boost_headeronly) endif () # Link the resources dir to where Slic3r GUI expects it diff --git a/src/admesh/CMakeLists.txt b/src/admesh/CMakeLists.txt index 941a7eeb5..7d0177782 100644 --- a/src/admesh/CMakeLists.txt +++ b/src/admesh/CMakeLists.txt @@ -11,4 +11,4 @@ add_library(admesh STATIC util.cpp ) -target_include_directories(admesh SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +target_link_libraries(admesh PRIVATE boost_headeronly) diff --git a/src/boost/CMakeLists.txt b/src/boost/CMakeLists.txt index aae87340b..12fe6b4e5 100644 --- a/src/boost/CMakeLists.txt +++ b/src/boost/CMakeLists.txt @@ -19,6 +19,6 @@ add_library(nowide STATIC nowide/windows.hpp ) -target_include_directories(nowide SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) +target_link_libraries(nowide PUBLIC boost_headeronly) diff --git a/src/libnest2d/include/libnest2d/backends/clipper/CMakeLists.txt b/src/libnest2d/include/libnest2d/backends/clipper/CMakeLists.txt index e20cbc70d..cf8a37350 100644 --- a/src/libnest2d/include/libnest2d/backends/clipper/CMakeLists.txt +++ b/src/libnest2d/include/libnest2d/backends/clipper/CMakeLists.txt @@ -56,12 +56,12 @@ endif() # Clipper backend is not enough on its own, it still needs some functions # from Boost geometry -if(NOT Boost_INCLUDE_DIRS_FOUND) +if(NOT Boost_FOUND) find_package(Boost 1.58 REQUIRED) # TODO automatic download of boost geometry headers endif() -target_include_directories(clipperBackend SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} ) +target_link_libraries(clipperBackend INTERFACE Boost::boost ) #target_sources(ClipperBackend INTERFACE # ${CMAKE_CURRENT_SOURCE_DIR}/geometries.hpp # ${CMAKE_CURRENT_SOURCE_DIR}/clipper_polygon.hpp diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index 833b1ae62..312a82c4c 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -182,13 +182,12 @@ if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY) endif () target_compile_definitions(libslic3r PUBLIC -DUSE_TBB) -target_include_directories(libslic3r SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) target_include_directories(libslic3r PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LIBNEST2D_INCLUDES} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(libslic3r libnest2d admesh miniz - ${Boost_LIBRARIES} + boost_libs clipper nowide ${EXPAT_LIBRARIES} diff --git a/src/slic3r/GUI/ProgressStatusBar.hpp b/src/slic3r/GUI/ProgressStatusBar.hpp index 225b0331e..8c6596475 100644 --- a/src/slic3r/GUI/ProgressStatusBar.hpp +++ b/src/slic3r/GUI/ProgressStatusBar.hpp @@ -3,6 +3,7 @@ #include #include +#include class wxTimer; class wxGauge; diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 4696badc4..aaf943970 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -119,8 +119,6 @@ target_include_directories(XS PRIVATE src ${LIBDIR}/libslic3r) target_compile_definitions(XS PRIVATE -DSLIC3RXS) set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating libXS.so instead of XS.so -target_link_libraries(XS ${Boost_LIBRARIES}) - if (APPLE) # -liconv: boost links to libiconv by default target_link_libraries(XS "-liconv -framework IOKit" "-framework CoreFoundation" -lc++) @@ -156,12 +154,6 @@ if (WIN32) target_link_libraries(XS ${PERL_LIBRARY}) endif() -target_link_libraries(XS ${Boost_LIBRARIES}) -target_link_libraries(XS ${TBB_LIBRARIES}) -# target_link_libraries(XS ${wxWidgets_LIBRARIES}) -target_link_libraries(XS ${EXPAT_LIBRARIES}) -# target_link_libraries(XS ${GLEW_LIBRARIES}) - # Install the XS.pm and XS.{so,dll,bundle} into the local-lib directory. set(PERL_LOCAL_LIB_DIR "../../local-lib/lib/perl5/${PerlEmbed_ARCHNAME}") add_custom_command( @@ -181,10 +173,6 @@ if(APPLE) ) endif() -if(SLIC3R_PROFILE) - target_link_libraries(Shiny) -endif() - if (MSVC) # Here we associate some additional properties with the MSVC project to enable compilation and debugging out of the box. get_filename_component(PROPS_PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY)