From 29a2ed2f17350f29680fd7cdcae9d3a1e3e5886b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Gst=C3=A4dtner?= Date: Mon, 4 Mar 2013 19:05:08 +0100 Subject: [PATCH 1/1] 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) :) --- CMakeLists.txt | 3 +++ ubus_common.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) 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) -- 2.11.0