diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 584fc2a2aa..f6a8249d4f 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -1019,14 +1019,9 @@ if (UNIX AND NOT APPLE) find_package(GTK${SLIC3R_GTK} REQUIRED) pkg_check_modules(LIBSECRET REQUIRED libsecret-1) pkg_check_modules(webkit2gtk REQUIRED webkit2gtk-4.1) - if (FLATPAK) - # I don't know why this is needed, but for whatever reason slic3r isn't - # linking to X11 and webkit2gtk. force it. - find_package(X11 REQUIRED) - target_link_libraries(libslic3r_gui ${X11_LIBRARIES} ${webkit2gtk_LIBRARIES}) - endif() + find_package(X11 REQUIRED) target_include_directories(libslic3r_gui SYSTEM PRIVATE ${GTK${SLIC3R_GTK}_INCLUDE_DIRS} ${LIBSECRET_INCLUDE_DIRS} ${webkit2gtk_INCLUDE_DIRS}) - target_link_libraries(libslic3r_gui ${GTK${SLIC3R_GTK}_LIBRARIES} fontconfig ${LIBSECRET_LIBRARIES}) + target_link_libraries(libslic3r_gui ${GTK${SLIC3R_GTK}_LIBRARIES} fontconfig ${LIBSECRET_LIBRARIES} ${webkit2gtk_LIBRARIES} ${X11_LIBRARIES}) # Propagate GDK backend detection results as compile definitions so that # LinuxDisplayBackend.cpp can include the right GDK headers.