mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Explicitly setting the version of json-c required
to 0.12.1. This is needed because the development version breaks the existing API of json_object_array_length() by moving the return from int to size_t. This would fix #1355
This commit is contained in:
parent
d75ee3f9ce
commit
69e9b1386f
11 changed files with 24 additions and 12 deletions
|
|
@ -8,10 +8,22 @@
|
|||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_JSONC QUIET JSONC)
|
||||
|
||||
if (JsonC_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED "REQUIRED")
|
||||
else()
|
||||
set(_pkgconfig_REQUIRED "")
|
||||
endif()
|
||||
|
||||
if(JsonC_FIND_VERSION)
|
||||
pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c=${JsonC_FIND_VERSION})
|
||||
else()
|
||||
pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c)
|
||||
endif()
|
||||
|
||||
find_path(JSONC_INCLUDE_DIRS NAMES json-c/json.h HINTS ${PC_JSONC_INCLUDE_DIRS})
|
||||
find_library(JSONC_LIBRARIES NAMES json-c HINTS ${PC_JSONC_LIBRARY_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(JSONC DEFAULT_MSG JSONC_LIBRARIES JSONC_INCLUDE_DIRS)
|
||||
mark_as_advanced(JSONC_LIBRARIES JSONC_INCLUDE_DIRS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue