From 6f7fa4bc09ce174350186a47dfc21754bb659d85 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 28 Apr 2020 21:01:09 +0200 Subject: [PATCH] Fix librt linking for wxWidgets --- src/CMakeLists.txt | 6 ++++++ src/slic3r/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7509ad4749..281f9e6631 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,6 +71,12 @@ if (SLIC3R_GUI) list(APPEND wxWidgets_LIBRARIES ${EXPAT_LIBRARIES}) endif () + # This is an issue in the new wxWidgets cmake build, doesn't deal with librt + find_library(LIBRT rt) + if(LIBRT) + list(APPEND wxWidgets_LIBRARIES ${LIBRT}) + endif() + # list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc) message(STATUS "wx libs: ${wxWidgets_LIBRARIES}") diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 3711b12a10..2ac8a1ff0f 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -204,7 +204,7 @@ add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES}) encoding_check(libslic3r_gui) -target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL OpenGL::GLU hidapi libcurl ${wxWidgets_LIBRARIES} rt) +target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL OpenGL::GLU hidapi libcurl ${wxWidgets_LIBRARIES}) if(APPLE) target_link_libraries(libslic3r_gui ${DISKARBITRATION_LIBRARY})