From 70eb06d3bdce1ca09e65de33d620f9311a890ee2 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 23 Aug 2025 09:54:32 +1000 Subject: [PATCH] CMake: Minor fix for pthread and m. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 975993a7..ab9f7581 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -483,12 +483,12 @@ if (UNIX) find_library(LIB_PTHREAD NAMES pthread) if(LIB_PTHREAD) - list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case. + list(APPEND COMMON_LINK_LIBRARIES ${LIB_PTHREAD}) # Some compilers will not link to pthread by default so list it here just in case. endif() find_library(LIB_M NAMES m) if(LIB_M) - list(APPEND COMMON_LINK_LIBRARIES m) + list(APPEND COMMON_LINK_LIBRARIES ${LIB_M}) endif() # If we're compiling for 32-bit ARM we need to link to -latomic.