diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4c5ecc..0589fc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -348,6 +348,12 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION)
 
   string(REGEX REPLACE "@PACKAGE_VERSION@" "${VERSION}" TEXT ${TEXT})
 
+  if(NOT BUILD_SHARED_LIBS)
+    if(LIBM_LIBRARY)
+      string(REPLACE " -lbrotlicommon" " -lbrotlicommon -l${LIBM_LIBRARY}" TEXT ${TEXT})
+    endif()
+  endif()
+
   file(WRITE ${OUTPUT_FILE} ${TEXT})
 endfunction()