Fix compilation of sprinklerd

This commit is contained in:
2017-04-21 23:56:05 +02:00
parent 298cde361d
commit 936487e3d9
22 changed files with 110 additions and 72 deletions

View File

@@ -1,28 +1,36 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required (VERSION 3.0)
include (libubus)
include (libubox)
include (libubuscpp)
project (libubus-cpp)
project (libubuscpp)
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
include (br)
include_directories ($ENV{SRC_DIR}/src/lib/libubus-cpp/include/)
file(
GLOB_RECURSE
source_files
../../src/UBusCall.cpp
../../src/UBusObject.cpp
../../src/UBusTimer.cpp
$ENV{SRC_DIR}/src/lib/libubus-cpp/src/UBusCall.cpp
$ENV{SRC_DIR}/src/lib/libubus-cpp/src/UBusObject.cpp
$ENV{SRC_DIR}/src/lib/libubus-cpp/src/UBusTimer.cpp
)
add_library(
ubuscpp
ubus-cpp
SHARED
${source_files}
)
target_link_libraries (ubuscpp
target_link_libraries (ubus-cpp
LINK_PUBLIC
ubus
)
)
target_include_directories (ubuscpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (ubus-cpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
install (TARGETS ubus-cpp LIBRARY DESTINATION local/lib)
file (GLOB headers $ENV{SRC_DIR}/src/lib/libubus-cpp/include/ubus-cpp/*)
install (FILES ${headers} DESTINATION include/ubus-cpp)

View File

@@ -29,7 +29,7 @@
/*------------------------------- INCLUDES ----------------------------------*/
extern "C" {
#include <ubus/libubus.h>
#include <libubus.h>
}

View File

@@ -1,5 +1,5 @@
/*!
* UbusCall.h
* UbusObject.h
*
* Copyright (c) 2015, NADAL Jean-Baptiste. All rights reserved.
*
@@ -28,7 +28,7 @@
/*------------------------------- INCLUDES ----------------------------------*/
#include "ubuscpp/UBusCpp.h"
#include "ubus-cpp/UBusCpp.h"
/*----------------------------- Dependencies --------------------------------*/

View File

@@ -32,7 +32,7 @@ extern "C" {
#include "common.h"
#include "ubuscpp/UBusCall.h"
#include "ubus-cpp/UBusCall.h"
#define kDefaultTimeoutInSecond 5

View File

@@ -1,17 +1,32 @@
/*!
* (C) Copyright 2003-2015 Awox SA. All rights reserved.
* This work contains confidential trade secrets of Awox.
* Use, examination, copying, transfer and disclosure to others
* are prohibited, except with the express written agreement of Awox.
* UbusCall.cpp
*
* Copyright (c) 2015, NADAL Jean-Baptiste. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*
* @Author: NADAL Jean-Baptiste
* @Date: 21/03/2015
*
* @Author: Awox
* @Date: 06/10/2014
*/
/*------------------------------- INCLUDES ----------------------------------*/
#include "ubuscpp/UBusObject.h"
#include "ubus-cpp/UBusObject.h"
/*------------------------------- GLOBALS ----------------------------------*/

View File

@@ -27,7 +27,7 @@
#include <cstdio>
#include "ubuscpp/UBusTimer.h"
#include "ubus-cpp/UBusTimer.h"
/*! ----------------------------------------------------------------------------