fix link if system json lib exists

This commit is contained in:
proller 2013-03-06 00:51:05 +04:00 committed by kwolekr
parent 5af8acfa6e
commit dd8593f2d6
2 changed files with 7 additions and 7 deletions

@ -2,17 +2,17 @@
#FIND_PATH(JSON_INCLUDE_DIR json.h) #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) #IF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
# SET( JSON_FOUND TRUE ) # SET( JSON_FOUND TRUE )
#ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR) #ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
#IF(JSON_FOUND) #IF(JSON_FOUND)
# MESSAGE(STATUS "Found system json header file in ${JSON_INCLUDE_DIR}") # MESSAGE(STATUS "Found system jsoncpp header file in ${JSON_INCLUDE_DIR}")
# MESSAGE(STATUS "Found system json library ${JSON_LIBRARY}") # MESSAGE(STATUS "Found system jsoncpp library ${JSON_LIBRARY}")
#ELSE(JSON_FOUND) #ELSE(JSON_FOUND)
SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json) SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json)
SET(JSON_LIBRARY json) SET(JSON_LIBRARY jsoncpp)
MESSAGE(STATUS "Using project json library") MESSAGE(STATUS "Using project jsoncpp library")
#ENDIF(JSON_FOUND) #ENDIF(JSON_FOUND)

@ -6,9 +6,9 @@ else( UNIX )
set(json_platform_LIBS "") set(json_platform_LIBS "")
endif( UNIX ) endif( UNIX )
add_library(json ${json_SRCS}) add_library(jsoncpp ${json_SRCS})
target_link_libraries( target_link_libraries(
json jsoncpp
${json_platform_LIBS} ${json_platform_LIBS}
) )