fix link if system json lib exists
authorproller <proller@github.com>
Tue, 5 Mar 2013 20:51:05 +0000 (00:51 +0400)
committerkwolekr <kwolekr@minetest.net>
Wed, 6 Mar 2013 04:54:07 +0000 (23:54 -0500)
cmake/Modules/FindJson.cmake
src/json/CMakeLists.txt

index bc4e71a298cc581f8baa2c32d9f38fd6f45735cb..a9178a2251dca2a3e865537420a86dc179b7330e 100644 (file)
@@ -2,17 +2,17 @@
 
 #FIND_PATH(JSON_INCLUDE_DIR json.h)
 
-#FIND_LIBRARY(JSON_LIBRARY NAMES json)
+#FIND_LIBRARY(JSON_LIBRARY NAMES jsoncpp)
 
 #IF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
 #      SET( JSON_FOUND TRUE )
 #ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
 
 #IF(JSON_FOUND)
-#      MESSAGE(STATUS "Found system json header file in ${JSON_INCLUDE_DIR}")
-#      MESSAGE(STATUS "Found system json library ${JSON_LIBRARY}")
+#      MESSAGE(STATUS "Found system jsoncpp header file in ${JSON_INCLUDE_DIR}")
+#      MESSAGE(STATUS "Found system jsoncpp library ${JSON_LIBRARY}")
 #ELSE(JSON_FOUND)
        SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json)
-       SET(JSON_LIBRARY json)
-       MESSAGE(STATUS "Using project json library")
+       SET(JSON_LIBRARY jsoncpp)
+       MESSAGE(STATUS "Using project jsoncpp library")
 #ENDIF(JSON_FOUND)
index 0957799aa8d4f0c2e6fd5001e47d6747800fd271..5887d523aabea878ccdc43ddfa47591ac3393d62 100644 (file)
@@ -6,9 +6,9 @@ else( UNIX )
        set(json_platform_LIBS "")
 endif( UNIX )
 
-add_library(json ${json_SRCS})
+add_library(jsoncpp ${json_SRCS})
 
 target_link_libraries(
-       json
+       jsoncpp
        ${json_platform_LIBS}
 )