From 2ee389044bc6ff1a8b066eb70f41cc8ec883f5fa Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 23 Dec 2007 16:28:09 -0800 Subject: [PATCH] Check for libm before including it --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f107e5d..d7093fa5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,6 @@ CHECK_TYPE_SIZE("void*" SIZEOF_VOIDP) # Add definitions, compiler switches, etc. INCLUDE_DIRECTORIES(OpenAL32/Include include "${OpenAL_BINARY_DIR}") -SET(EXTRA_LIBS m ${EXTRA_LIBS}) IF("${MSVC}") # ??? @@ -94,6 +93,9 @@ ELSEIF(NODEBUG) ENDIF() CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_SQRTF) +IF("${HAVE_SQRTF}") + SET(EXTRA_LIBS m ${EXTRA_LIBS}) +ENDIF() CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF) CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)