Permalink
Browse files

fix win32 build - don't link libm on doze

  • Loading branch information...
lloyd committed Feb 23, 2014
1 parent 468f219 commit 13cf23655c8f917c3f487800d7bb397b7cbc432a
Showing with 7 additions and 1 deletion.
  1. +7 −1 reformatter/CMakeLists.txt
@@ -26,7 +26,13 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(json_reformat ${SRCS})
-TARGET_LINK_LIBRARIES(json_reformat m yajl_s)
+TARGET_LINK_LIBRARIES(json_reformat yajl_s)
+
+# In some environments, we must explicitly link libm (like qnx,
+# thanks @shahbag)
+IF (NOT WIN32)
+ TARGET_LINK_LIBRARIES(json_reformat m)
+ENDIF (NOT WIN32)
# copy the binary into the output directory
GET_TARGET_PROPERTY(binPath json_reformat LOCATION)

0 comments on commit 13cf236

Please sign in to comment.