From: Frederic Marchal Date: Sun, 21 Sep 2014 08:59:39 +0000 (+0200) Subject: Explicitly link against the math library X-Git-Tag: v2.3.9~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79e39fb50f1fd4ba5d54e73faafc3fd5ea55df41;p=thirdparty%2Fsarg.git Explicitly link against the math library This patch was suggested by Diego Elio Pettenò on May 25, 2011 and implemented in commit b966a3a224de2a6ea591458bec47c1bb4e9b3745 but the patch had not been applied to the CMake build file. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a876ea5..9fc1098 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,9 @@ IF(!HAVE_GETOPT_H) MESSAGE(SEND_ERROR "getopt.h is required to compile sarg") ENDIF(!HAVE_GETOPT_H) +# Required libraries +TARGET_LINK_LIBRARIES(sarg m) + # Windows need lib wsock32 and ws2_32 IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)