--- files/patch-glib-demo-CMakeLists.txt (nonexistent) +++ files/patch-glib-demo-CMakeLists.txt (working copy) @@ -0,0 +1,16 @@ +Fix this error: +/usr/bin/ld: cannot find -lgtk-3 +see https://stackoverflow.com/questions/29191855/what-is-the-proper-way-to-use-pkg-config-from-cmake +need to add -L paths as well as -lgtk-3; try to leverage pkg-config + Note: earlier attempt to change GTK3_LIBRARIES to PkgConfig::GTK3 didn't add -L paths to link.txt + +--- glib/demo/CMakeLists.txt.orig 2019-12-28 12:18:51 UTC ++++ glib/demo/CMakeLists.txt +@@ -27,4 +27,6 @@ + taggedstruct.c + ) + poppler_add_test(poppler-glib-demo BUILD_GTK_TESTS ${poppler_glib_demo_SRCS}) +-target_link_libraries(poppler-glib-demo ${CAIRO_LIBRARIES} poppler-glib ${GTK3_LIBRARIES}) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0) ++target_link_libraries(poppler-glib-demo ${CAIRO_LIBRARIES} poppler-glib PkgConfig::GTK3)