1
0
Fork 0
forked from fun/fun

Massive CMake refactoring... No code changes. (0.37.55)

This commit is contained in:
Johannes Findeisen 2026-01-15 22:57:54 +01:00
commit 501be417e8
22 changed files with 513 additions and 568 deletions

View file

@ -0,0 +1,17 @@
# JSON (json-c)
option(FUN_WITH_JSON "Enable JSON (json-c) support" OFF)
set(JSONC_INCLUDE_DIRS "")
set(JSONC_LINK_LIBS "")
if(FUN_WITH_JSON)
add_definitions(-DFUN_WITH_JSON)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(JSONC QUIET json-c)
endif()
if(JSONC_FOUND)
list(APPEND JSONC_INCLUDE_DIRS ${JSONC_INCLUDE_DIRS} ${JSONC_INCLUDE_DIRS})
list(APPEND JSONC_LINK_LIBS ${JSONC_LINK_LIBS} ${JSONC_LIBRARIES})
else()
list(APPEND JSONC_LINK_LIBS json-c)
endif()
endif()