aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-23 16:28:09 -0800
committerChris Robinson <[email protected]>2007-12-23 16:28:09 -0800
commit2ee389044bc6ff1a8b066eb70f41cc8ec883f5fa (patch)
tree4d52ecafb334514819ceeb6fb8de4514b4209ed2
parenta48201ed94225ab103164b7a95946c1e6a586e69 (diff)
Check for libm before including it
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
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)