greenhouse/cmake_modules/FindJSONCPP.cmake
matlabbe 6a0136cc16 Added JSON optional output when in console mode (see --json option)
Added --scene option to process a single scene file
Moved some apps in tools subfolder


git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@362 620bd6b2-0a58-f614-fd9a-1bd335dccda9
2014-08-01 21:11:26 +00:00

30 lines
1013 B
CMake

# - Find JSONCPP
# This module finds an installed JSONCPP package.
#
# It sets the following variables:
# JSONCPP_FOUND - Set to false, or undefined, if JSONCPP isn't found.
# JSONCPP_INCLUDE_DIRS - The JSONCPP include directory.
# JSONCPP_LIBRARIES - The JSONCPP library to link against.
FIND_PATH(JSONCPP_INCLUDE_DIRS json/features.h PATH_SUFFIXES jsoncpp)
FIND_LIBRARY(JSONCPP_LIBRARY NAMES jsoncpp)
IF (JSONCPP_INCLUDE_DIRS AND JSONCPP_LIBRARY)
SET(JSONCPP_FOUND TRUE)
ENDIF (JSONCPP_INCLUDE_DIRS AND JSONCPP_LIBRARY)
IF (JSONCPP_FOUND)
# show which JSONCPP was found only if not quiet
SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
IF (NOT JSONCPP_FIND_QUIETLY)
MESSAGE(STATUS "Found JSONCPP: ${JSONCPP_LIBRARIES}")
ENDIF (NOT JSONCPP_FIND_QUIETLY)
ELSE (JSONCPP_FOUND)
# fatal error if JSONCPP is required but not found
IF (JSONCPP_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find JSONCPP (libjsoncpp)")
ENDIF (JSONCPP_FIND_REQUIRED)
ENDIF (JSONCPP_FOUND)