libtiff: Always link to libm if available

From cd38e31d6eba39b05c15e25295b6b92e53b5ec77 Mon Sep 17 00:00:00 2001
From: Matthias Kuhn <[EMAIL REDACTED]>
Date: Thu, 9 Jun 2022 12:45:20 +0200
Subject: [PATCH] Always link to libm if available

---
 cmake/FindCMath.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/FindCMath.cmake b/cmake/FindCMath.cmake
index 2da3b7f1..ad922180 100644
--- a/cmake/FindCMath.cmake
+++ b/cmake/FindCMath.cmake
@@ -31,9 +31,9 @@ include(CheckSymbolExists)
 include(CheckLibraryExists)
 
 check_symbol_exists(pow "math.h" CMath_HAVE_LIBC_POW)
-if(NOT CMath_HAVE_LIBC_POW)
-    find_library(CMath_LIBRARY NAMES m)
+find_library(CMath_LIBRARY NAMES m)
 
+if(NOT CMath_HAVE_LIBC_POW)
     set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
     set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMath_LIBRARY})
     check_symbol_exists(pow "math.h" CMath_HAVE_LIBM_POW)