fix-m-lib.diff 468 B

1234567891011121314
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index b59b470f..8e6b2e3c 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -361,6 +361,9 @@ function(add_h3_library name h3_alloc_prefix_override)
  6. target_compile_features(${name} PUBLIC c_std_99)
  7. find_library(M_LIB m)
  8. + if(NOT(M_LIB))
  9. + find_library(M_LIB m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
  10. + endif()
  11. if(M_LIB)
  12. target_link_libraries(${name} PUBLIC ${M_LIB})
  13. endif()