X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=CMakeLists.txt;h=1634b9b74122a0800c27cca6aa1d2485b43b7d35;hp=30f184de1a81d750dd1bb98ef9a5397330d8a245;hb=80d64827e9238a883c9d5b8c7fc404accf3f743a;hpb=57d1599c1add00bce8824b5e52392f007ed1ed82 diff --git a/CMakeLists.txt b/CMakeLists.txt index 30f184d..1634b9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ PROJECT(ubus C) ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) OPTION(BUILD_LUA "build Lua plugin" ON) +OPTION(BUILD_EXAMPLES "build examples" ON) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") @@ -12,7 +13,7 @@ IF(APPLE) LINK_DIRECTORIES(/opt/local/lib) ENDIF() -ADD_LIBRARY(ubus SHARED libubus.c) +ADD_LIBRARY(ubus SHARED libubus.c libubus-io.c libubus-obj.c libubus-sub.c libubus-req.c) TARGET_LINK_LIBRARIES(ubus ubox) ADD_EXECUTABLE(ubusd ubusd.c ubusd_id.c ubusd_obj.c ubusd_proto.c ubusd_event.c) @@ -22,8 +23,6 @@ ADD_EXECUTABLE(cli cli.c) SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME ubus) TARGET_LINK_LIBRARIES(cli ubus ubox blobmsg_json json) -SET(CMAKE_INSTALL_PREFIX /usr) - ADD_SUBDIRECTORY(lua) ADD_SUBDIRECTORY(examples)