mdbx-cmake: cleanup from linking with libm.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-10-28 23:49:17 +03:00
parent f695a1b48e
commit f488d84dc7

View File

@@ -335,19 +335,6 @@ if(NOT APPLE
endif() endif()
endif() endif()
check_function_exists(pow NOT_NEED_LIBM)
if(NOT_NEED_LIBM)
set(LIB_MATH "")
else()
set(CMAKE_REQUIRED_LIBRARIES m)
check_function_exists(pow HAVE_LIBM)
if(HAVE_LIBM)
set(LIB_MATH m)
else()
message(FATAL_ERROR "No libm found for math support")
endif()
endif()
if(SUBPROJECT) if(SUBPROJECT)
if(NOT DEFINED BUILD_SHARED_LIBS) if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)" OFF) option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)" OFF)
@@ -1036,10 +1023,6 @@ if(MDBX_BUILD_TOOLS)
target_setup_options(mdbx_${TOOL}) target_setup_options(mdbx_${TOOL})
target_link_libraries(mdbx_${TOOL} ${TOOL_MDBX_LIB}) target_link_libraries(mdbx_${TOOL} ${TOOL_MDBX_LIB})
endforeach() endforeach()
if(LIB_MATH)
target_link_libraries(mdbx_chk ${LIB_MATH})
target_link_libraries(mdbx_stat ${LIB_MATH})
endif()
endif() endif()
# ###################################################################################################################### # ######################################################################################################################