Massive CMake refactoring... No code changes. (0.37.55)
This commit is contained in:
parent
a63aff3daa
commit
501be417e8
22 changed files with 513 additions and 568 deletions
17
cmake/Extensions/JSON.cmake
Normal file
17
cmake/Extensions/JSON.cmake
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue