X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=CMakeLists.txt;h=30689865888714ebf9c3af6f98f4bf1e6eceeee6;hb=18530d133238f83763d65e8384111eafe21fd382;hp=f1c406f4a288f357294e83a6a1850b36c4cab9e2;hpb=87a7ed7f400541da5441336152e3cd3657aead51;p=freeglut diff --git a/CMakeLists.txt b/CMakeLists.txt index f1c406f..3068986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,10 @@ ENDIF() # lib m for math, not needed on windows IF (NOT WIN32) + # For compilation: LIST(APPEND LIBS m) + # For CHECK_FUNCTION_EXISTS: + LIST(APPEND CMAKE_REQUIRED_LIBRARIES m) ENDIF() IF(WIN32) @@ -261,6 +264,10 @@ IF (NOT (HAVE_STDINT_H OR HAVE_INTTYPES_H)) ENDIF() ENDIF() +# Check for sinf/cosf/sqrtf +CHECK_FUNCTION_EXISTS(sinf HAVE_SINF) +CHECK_FUNCTION_EXISTS(cosf HAVE_COSF) +CHECK_FUNCTION_EXISTS(sqrtf HAVE_SQRTF) # The generated config.h is placed in the project's build directory, just to # ensure that all CMake-generated files are kept away from the main source tree.