Fix static linking and tests
(from gentoo linux)
- https://github.com/lloyd/yajl/pull/256

Index: reformatter/CMakeLists.txt
--- reformatter/CMakeLists.txt.orig
+++ reformatter/CMakeLists.txt
@@ -26,7 +26,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL
 
 ADD_EXECUTABLE(json_reformat ${SRCS})
 
-TARGET_LINK_LIBRARIES(json_reformat yajl_s)
+TARGET_LINK_LIBRARIES(json_reformat yajl)
 
 # In some environments, we must explicitly link libm (like qnx,
 # thanks @shahbag)
@@ -34,10 +34,7 @@ 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)
-
 ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:json_reformat> ${binDir})
 
 INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin)
