Use pkg_search_module to find webkit2gtk-4.0 or 4.1.

This commit is contained in:
Martin Šach 2024-08-13 16:19:24 +02:00 committed by Lukas Matena
parent 46ad156610
commit a552b8fd07

View File

@ -461,10 +461,8 @@ if (UNIX AND NOT APPLE)
find_package(GTK${SLIC3R_GTK} REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(WEBKIT2GTK REQUIRED webkit2gtk-4.0)
target_include_directories(libslic3r_gui PRIVATE ${GTK${SLIC3R_GTK}_INCLUDE_DIRS} ${WEBKIT2GTK_INCLUDE_DIRS})
target_link_libraries(libslic3r_gui PUBLIC ${GTK${SLIC3R_GTK}_LIBRARIES} fontconfig ${WEBKIT2GTK_LIBS})
pkg_search_module(WEBKIT2GTK REQUIRED IMPORTED_TARGET webkit2gtk-4.0 webkit2gtk-4.1)
target_link_libraries(libslic3r_gui PUBLIC ${GTK${SLIC3R_GTK}_LIBRARIES} fontconfig PkgConfig::WEBKIT2GTK)
endif ()
# Add a definition so that we can tell we are compiling slic3r.