[cmake] fallback cJSON detection
This commit is contained in:
parent
4f2d9ac313
commit
2cd64ba424
@ -259,9 +259,18 @@ endif()
|
||||
if (WITH_AAD)
|
||||
if (NOT cJSON_FOUND)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(CJSON REQUIRED libcjson)
|
||||
pkg_check_modules(CJSON libcjson)
|
||||
endif()
|
||||
if (NOT CJSON_LIBRARIES OR NOT CJSON_INCLUDE_DIRS)
|
||||
find_path(CJSON_INCLUDE_DIRS
|
||||
NAMES cjson/cJSON.h
|
||||
REQUIRED
|
||||
)
|
||||
find_library(CJSON_LIBRARIES
|
||||
NAMES cjson
|
||||
REQUIRED
|
||||
)
|
||||
endif()
|
||||
include_directories(${CJSON_INCLUDE_DIRS})
|
||||
|
||||
freerdp_library_add(${CJSON_LIBRARIES})
|
||||
include_directories(${CJSON_INCLUDE_DIRS})
|
||||
|
Loading…
Reference in New Issue
Block a user