--- CMakeLists.txt.orig	2022-02-01 17:36:09 UTC
+++ CMakeLists.txt
@@ -11,8 +11,6 @@ pkg_search_module(CAIRO REQUIRED cairo)
 pkg_search_module(GLIB2 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,8 +35,8 @@ target_link_libraries(filebrowser
 set_target_properties(filebrowser PROPERTIES PREFIX "")
 
 target_link_libraries(filebrowser
-    ${GLIB2_LIBRARIES}
-    ${CAIRO_LIBRARIES}
+    ${GLIB2_LDFLAGS}
+    ${CAIRO_LDFLAGS}
 )
 
 install(TARGETS filebrowser DESTINATION ${ROFI_PLUGINS_DIR})
@@ -53,4 +51,4 @@ add_custom_target(manpage ALL DEPENDS "${CMAKE_CURRENT
 
 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}")
