--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -97,4 +97,7 @@ if(LIBHPDF_SHARED)
     LIBRARY DESTINATION lib
     RUNTIME DESTINATION bin
   )
+  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    target_link_libraries(${LIBHPDF_NAME} PRIVATE m)
+  endif()
 endif(LIBHPDF_SHARED)
