diff --git a/src/libnest2d/CMakeLists.txt b/src/libnest2d/CMakeLists.txt
index c18dc31cb..852d26d5e 100644
--- a/src/libnest2d/CMakeLists.txt
+++ b/src/libnest2d/CMakeLists.txt
@@ -24,5 +24,6 @@ set(LIBNEST2D_SRCFILES
 add_library(libnest2d STATIC ${LIBNEST2D_SRCFILES})
 
 target_include_directories(libnest2d PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
-target_link_libraries(libnest2d PUBLIC NLopt::nlopt TBB::tbb Boost::boost libslic3r)
+target_link_libraries(libnest2d PUBLIC NLopt::nlopt TBB::tbb Boost::boost
+    libslic3r xcb)
 target_compile_definitions(libnest2d PUBLIC LIBNEST2D_THREADING_tbb LIBNEST2D_STATIC LIBNEST2D_OPTIMIZER_nlopt LIBNEST2D_GEOMETRIES_libslic3r)
