]> git.sesse.net Git - kdenlive/blob - cmake/modules/FindQJSON.cmake
Fix indent
[kdenlive] / cmake / modules / FindQJSON.cmake
1 # Find QJSON - JSON handling library for Qt
2 # Source: http://gitorious.org/libmygpo-qt/libmygpo-qt/blobs/634b150fabdcafddcfb98a9a08cc414d95ae0dbe/cmake/modules/FindQJSON.cmake
3 #
4 # This module defines
5 #  QJSON_FOUND - whether the qsjon library was found
6 #  QJSON_LIBRARIES - the qjson library
7 #  QJSON_INCLUDE_DIR - the include path of the qjson library
8 #
9
10 if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
11
12   # Already in cache
13   set (QJSON_FOUND TRUE)
14
15 else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
16
17   if (NOT WIN32)
18     # use pkg-config to get the values of QJSON_INCLUDE_DIRS
19     # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
20     include (FindPkgConfig)
21     pkg_check_modules (QJSON REQUIRED QJson>=0.5)
22   endif (NOT WIN32)
23
24   find_library (QJSON_LIBRARIES
25     NAMES
26     qjson
27     PATHS
28     ${QJSON_LIBRARY_DIRS}
29     ${LIB_INSTALL_DIR}
30     ${KDE4_LIB_DIR}
31   )
32
33   find_path (QJSON_INCLUDE_DIR
34     NAMES
35     parser.h
36     PATH_SUFFIXES
37     qjson
38     PATHS
39     ${QJSON_INCLUDE_DIRS}
40     ${INCLUDE_INSTALL_DIR}
41     ${KDE4_INCLUDE_DIR}
42   )
43
44   include(FindPackageHandleStandardArgs)
45   find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
46
47 endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)