diff options
author | 2015-08-26 18:48:50 -0400 | |
---|---|---|
committer | 2015-08-26 18:48:50 -0400 | |
commit | eb53f173c5cc3739149b3fafc50ab55d5503a649 (patch) | |
tree | 49eae9ae84adbe27d639005515111b324a328fad /CMake/FindJsonC.cmake | |
parent | some function documentation, fixed gaps on config reload (diff) | |
parent | fixed container_map (diff) | |
download | sway-eb53f173c5cc3739149b3fafc50ab55d5503a649.tar.gz sway-eb53f173c5cc3739149b3fafc50ab55d5503a649.tar.zst sway-eb53f173c5cc3739149b3fafc50ab55d5503a649.zip |
Merge pull request #137 from minus7/json
added json-c lib and implemented IPC get_version
Diffstat (limited to 'CMake/FindJsonC.cmake')
-rw-r--r-- | CMake/FindJsonC.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMake/FindJsonC.cmake b/CMake/FindJsonC.cmake new file mode 100644 index 00000000..2ca0df39 --- /dev/null +++ b/CMake/FindJsonC.cmake | |||
@@ -0,0 +1,17 @@ | |||
1 | # - Find json-c | ||
2 | # Find the json-c libraries | ||
3 | # | ||
4 | # This module defines the following variables: | ||
5 | # JSONC_FOUND - True if JSONC is found | ||
6 | # JSONC_LIBRARIES - JSONC libraries | ||
7 | # JSONC_INCLUDE_DIRS - JSONC include directories | ||
8 | # | ||
9 | |||
10 | find_package(PkgConfig) | ||
11 | pkg_check_modules(PC_JSONC QUIET JSONC) | ||
12 | find_path(JSONC_INCLUDE_DIRS NAMES json-c/json.h HINTS ${PC_JSONC_INCLUDE_DIRS}) | ||
13 | find_library(JSONC_LIBRARIES NAMES json-c HINTS ${PC_JSONC_LIBRARY_DIRS}) | ||
14 | |||
15 | include(FindPackageHandleStandardArgs) | ||
16 | find_package_handle_standard_args(JSONC DEFAULT_MSG JSONC_LIBRARIES JSONC_INCLUDE_DIRS) | ||
17 | mark_as_advanced(JSONC_LIBRARIES JSONC_INCLUDE_DIRS) | ||