We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8beffb8 commit f69a64fCopy full SHA for f69a64f
library/CMakeLists.txt
@@ -47,7 +47,20 @@ if (ziti_DEVELOPER_MODE)
47
endif ()
48
49
50
-find_package(json-c CONFIG REQUIRED)
+find_package(json-c CONFIG QUIET)
51
+if(NOT json-c_FOUND)
52
+ find_package(PkgConfig REQUIRED)
53
+ pkg_check_modules(JSONC REQUIRED json-c)
54
+ include_directories(${JSONC_INCLUDE_DIRS})
55
+ link_libraries(${JSONC_LIBRARIES})
56
+ if(NOT TARGET json-c::json-c)
57
+ add_library(json-c::json-c INTERFACE IMPORTED)
58
+ set_target_properties(json-c::json-c PROPERTIES
59
+ INTERFACE_INCLUDE_DIRECTORIES "${JSONC_INCLUDE_DIRS}"
60
+ INTERFACE_LINK_LIBRARIES "${JSONC_LIBRARIES}"
61
+ )
62
+ endif()
63
+endif()
64
65
set(ZITI_HEADER_FILES
66
${PROJECT_SOURCE_DIR}/includes/ziti/errors.h
0 commit comments