From 3d6db6ff2d49528eb3c4035f060cf2652b48620e Mon Sep 17 00:00:00 2001 From: Paul Molodowitch Date: Wed, 8 Nov 2023 10:04:09 -0800 Subject: [PATCH] cmake: fix for absolute path to libm.so in pxrConfig.cmake The absolute path makes pxrConfig.cmake non-portable between different distros of Linux (or any other situation where the location of libm.so differs). --- cmake/defaults/Packages.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/defaults/Packages.cmake b/cmake/defaults/Packages.cmake index c782245b80..4451c3e7cd 100644 --- a/cmake/defaults/Packages.cmake +++ b/cmake/defaults/Packages.cmake @@ -159,11 +159,8 @@ add_definitions(${TBB_DEFINITIONS}) if(WIN32) # Math functions are linked automatically by including math.h on Windows. set(M_LIB "") -elseif (APPLE) - # On Apple platforms, its idiomatic to just provide the -l linkage for sdk libs to be portable across SDK versions - set(M_LIB "-lm") else() - find_library(M_LIB m) + set(M_LIB m) endif() if (NOT PXR_MALLOC_LIBRARY)