--- CMakeLists.txt.orig	2022-02-01 17:36:09 UTC
+++ CMakeLists.txt
@@ -8,11 +8,9 @@ project(rofi-file-browser-extended)
 # Plugin
 
 find_package(PkgConfig)
-pkg_search_module(GLIB2 REQUIRED glib-2.0)
+pkg_search_module(GLIB REQUIRED glib-2.0)
 pkg_search_module(CAIRO REQUIRED cairo)
 
-pkg_get_variable(ROFI_PLUGINS_DIR rofi pluginsdir)
-
 include_directories(
     include
     ${GLIB2_INCLUDE_DIRS}
@@ -37,7 +35,7 @@ add_library(filebrowser SHARED ${SRC})
 set_target_properties(filebrowser PROPERTIES PREFIX "")
 
 target_link_libraries(filebrowser
-    ${GLIB2_LIBRARIES}
+    ${GLIB_LDFLAGS}
     ${CAIRO_LIBRARIES}
 )
 
@@ -53,4 +51,4 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}
 
 add_custom_target(manpage ALL DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc/rofi-file-browser-extended.1.gz")
 
-install(FILES "doc/rofi-file-browser-extended.1.gz" DESTINATION "/usr/share/man/man1")
+install(FILES "doc/rofi-file-browser-extended.1.gz" DESTINATION "${CMAKE_INSTALL_MANDIR}")
