mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
[cmake] fallback cJSON detection
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user