librelist archives

« back to archive

[PATCH] fix json_reformat linking on uClibc

[PATCH] fix json_reformat linking on uClibc

From:
Peter Korsgaard
Date:
2011-06-23 @ 18:26
json_reformat calls yajl_gen_* functions, which internally use isnan() /
isinf(). On Glibc, these are provided by libc, but on uClibc you need to
link with -lm (like the spec says), so ensure we do so.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 reformatter/CMakeLists.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt
index da4032b..d48e218 100644
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -26,7 +26,7 @@ 
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
 
 ADD_EXECUTABLE(json_reformat ${SRCS})
 
-TARGET_LINK_LIBRARIES(json_reformat yajl_s)
+TARGET_LINK_LIBRARIES(json_reformat yajl_s m)
 
 # copy the binary into the output directory
 GET_TARGET_PROPERTY(binPath json_reformat LOCATION)
-- 
1.7.5.3