2020-08-11 07:08:37 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2021-11-19 13:25:08 +08:00
|
|
|
index c36908b..390ac0a 100644
|
2020-08-11 07:08:37 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-02-29 09:11:12 +08:00
|
|
|
@@ -944,6 +944,15 @@ OPTION(ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." OFF)
|
2020-08-11 07:08:37 +08:00
|
|
|
|
|
|
|
# Check for the math library so it can be explicitly linked.
|
|
|
|
IF(NOT WIN32)
|
2024-02-29 09:11:12 +08:00
|
|
|
+ block(SCOPE_FOR VARIABLES)
|
|
|
|
+ if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
|
|
+ list(PREPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
|
|
|
+ endif()
|
|
|
|
+ find_library(HAVE_LIBM_PATH m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
|
|
+ if(HAVE_LIBM_PATH)
|
|
|
|
+ set(HAVE_LIBM m CACHE STRING "Math link library")
|
|
|
|
+ endif()
|
|
|
|
+ endblock()
|
|
|
|
FIND_LIBRARY(HAVE_LIBM NAMES math m libm)
|
2020-08-11 07:08:37 +08:00
|
|
|
MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}")
|
|
|
|
IF(NOT HAVE_LIBM)
|