From: Thomas Gstädtner Date: Mon, 4 Mar 2013 18:05:08 +0000 (+0100) Subject: make UBUS_UNIX_SOCKET configurable via cmake X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=commitdiff_plain;h=29a2ed2f17350f29680fd7cdcae9d3a1e3e5886b;hp=a15a09aed4f72424e5533375cb8de0763fb2ea31 make UBUS_UNIX_SOCKET configurable via cmake this is mainly useful to have a single location to read the setting from, when it is used multiple times at build time (which it will in a following patch) :) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1634b9b..01b43c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,9 @@ OPTION(BUILD_LUA "build Lua plugin" ON) OPTION(BUILD_EXAMPLES "build examples" ON) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +SET(UBUS_UNIX_SOCKET "/var/run/ubus.sock") + +ADD_DEFINITIONS( -DUBUS_UNIX_SOCKET="${UBUS_UNIX_SOCKET}") IF(APPLE) INCLUDE_DIRECTORIES(/opt/local/include) diff --git a/ubus_common.h b/ubus_common.h index 2429059..18cb664 100644 --- a/ubus_common.h +++ b/ubus_common.h @@ -14,8 +14,6 @@ #ifndef __UBUS_COMMON_H #define __UBUS_COMMON_H -#define UBUS_UNIX_SOCKET "/var/run/ubus.sock" - #define UBUS_SIGNATURE_METHOD (BLOBMSG_TYPE_LAST + 1) #define UBUS_SIGNATURE_END (BLOBMSG_TYPE_LAST + 2)