diff options
author | Sergey Ponomarev <stokito@gmail.com> | 2021-01-19 09:14:16 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-06-29 02:14:32 +0200 |
commit | 013b75ab0598e84be84aa6eda79827c12265988f (patch) | |
tree | 6709b47499b1cc0f36fefe474ec367ef5791e8d3 | |
parent | c7e938d6582a436dddc938539e72dd1320625c54 (diff) | |
download | jsonpath-master.tar.gz |
The cmake logic is wrong (E.G. PKG_CHECK_FOR_MODULES fails unless all
modules are found), and the legacy libjson.so name is also used by the
other libjson (for example [1]) which provides an incompatible API,
so just drop it.
Backported from libubox cbf80de7f4df61960f386cb01a899cf4228d38f3
[1] http://sourceforge.net/projects/libjson/
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
[ wrapped commit description to 75 char limit ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7361eb2..dbfbf5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,14 +7,12 @@ IF(NOT APPLE) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections") ENDIF() -find_library(json NAMES json-c json) - IF(DEBUG) ADD_DEFINITIONS(-DDEBUG -g3) ENDIF() INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(JSONC json-c json) +PKG_CHECK_MODULES(JSONC json-c) IF(JSONC_FOUND) ADD_DEFINITIONS(-DJSONC) INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) @@ -40,6 +38,7 @@ INCLUDE_DIRECTORIES(${ubox_include_dir}) SET_PROPERTY(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "lemon;parser.h;parser.out") SET_SOURCE_FILES_PROPERTIES("parser.c" PROPERTIES GENERATED TRUE) ADD_EXECUTABLE(jsonpath main.c ast.c lexer.c parser.c matcher.c) +find_library(json NAMES json-c) TARGET_LINK_LIBRARIES(jsonpath ubox ${json}) INSTALL(TARGETS jsonpath RUNTIME DESTINATION bin) |