Skip to content

Commit

Permalink
Merge pull request #34 from finetjul/fix-jsoncpp-find_package-with-sy…
Browse files Browse the repository at this point in the history
…stem-lib

Don't search default path when JsonCpp_DIR is provided
  • Loading branch information
finetjul committed Jun 18, 2014
2 parents ec20a24 + 39c0f66 commit 865e2a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMake/FindJsonCpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ if( JsonCpp_DIR )
${JsonCpp_DIR}/lib/MinSizeRel
${JsonCpp_DIR}/lib/RelWithDebInfo
${JsonCpp_DIR}/lib/Debug )
set( _jsoncpp_options NO_DEFAULT_PATH )
endif( JsonCpp_DIR )

find_path( JsonCpp_INCLUDE_DIR NAMES json/json.h
HINTS ${_jsoncpp_include_dir}
PATH_SUFFIXES jsoncpp )
PATH_SUFFIXES jsoncpp
${_jsoncpp_options} )

find_library( JsonCpp_LIBRARY NAMES jsoncpp libjsoncpp
HINTS ${_jsoncpp_library} )
HINTS ${_jsoncpp_library}
${_jsoncpp_options} )

set( JsonCpp_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR} )
set( JsonCpp_LIBRARIES ${JsonCpp_LIBRARY} )
Expand Down

0 comments on commit 865e2a7

Please sign in to comment.