X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=CMakeLists.txt;h=cb2f42035d61bbeee99b221470f2a045b2e13a56;hp=22027ec3b9b6f1822e7dcce8455ad002bacbc923;hb=e52db46c9c5d8eabe5abaccf28468c6e0b99be95;hpb=62cdfc3d16f815e24b9c62eb9a3bacd9aa8f621a diff --git a/CMakeLists.txt b/CMakeLists.txt index 22027ec..cb2f420 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,10 @@ OPTION(ENABLE_SYSTEMD "systemd support" ON) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") SET(UBUS_UNIX_SOCKET "/var/run/ubus.sock") +SET(UBUS_MAX_MSGLEN 1048576) ADD_DEFINITIONS( -DUBUS_UNIX_SOCKET="${UBUS_UNIX_SOCKET}") +ADD_DEFINITIONS( -DUBUS_MAX_MSGLEN=${UBUS_MAX_MSGLEN}) IF(APPLE) INCLUDE_DIRECTORIES(/opt/local/include) @@ -23,9 +25,10 @@ TARGET_LINK_LIBRARIES(ubus ubox) ADD_EXECUTABLE(ubusd ubusd.c ubusd_id.c ubusd_obj.c ubusd_proto.c ubusd_event.c) TARGET_LINK_LIBRARIES(ubusd ubox) +find_library(json NAMES json-c json) ADD_EXECUTABLE(cli cli.c) SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME ubus) -TARGET_LINK_LIBRARIES(cli ubus ubox blobmsg_json json) +TARGET_LINK_LIBRARIES(cli ubus ubox blobmsg_json ${json}) ADD_SUBDIRECTORY(lua) ADD_SUBDIRECTORY(examples)