1 # Find QJSON - JSON handling library for Qt
4 # QJSON_FOUND - whether the qsjon library was found
5 # QJSON_LIBRARIES - the qjson library
6 # QJSON_INCLUDE_DIR - the include path of the qjson library
9 if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
12 set (QJSON_FOUND TRUE)
14 else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
17 # use pkg-config to get the values of QJSON_INCLUDE_DIRS
18 # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
19 include (FindPkgConfig)
20 pkg_check_modules (PC_QJSON QJson>=0.5)
23 find_library (QJSON_LIBRARIES
27 ${PC_QJSON_LIBRARY_DIRS}
32 find_path (QJSON_INCLUDE_DIR
36 ${PC_QJSON_INCLUDE_DIRS}
37 ${INCLUDE_INSTALL_DIR}
41 include(FindPackageHandleStandardArgs)
42 find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
44 endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)