Fix Cmake to exclude libm when DH is not enabled

This commit is contained in:
Eric Blankenhorn
2023-01-17 16:28:36 -06:00
parent b15bc3d236
commit 68520e3f0b

View File

@@ -1949,10 +1949,12 @@ elseif(APPLE)
${SECURITY_FRAMEWORK})
endif()
else()
# DH requires math (m) library
target_link_libraries(wolfssl
PUBLIC
m)
if(WOLFSSL_DH)
# DH requires math (m) library
target_link_libraries(wolfssl
PUBLIC
m)
endif()
endif()
####################################################