Fix compilation of chacond.

This commit is contained in:
2017-04-21 23:24:55 +02:00
parent 518493d848
commit 298cde361d
5 changed files with 19 additions and 16 deletions

View File

@@ -1,30 +1,32 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required (VERSION 3.0)
project(chacond)
include (libubus)
include (libubox)
include (wiringPi)
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
include_directories(../../src)
include (br)
file(
include_directories ($ENV{SRC_DIR}/src/prog/chacond)
file (
GLOB_RECURSE
source_files
../../src/main.c
../../src/UBusModel.c
../../src/Chacon.c
$ENV{SRC_DIR}/src/prog/chacond/src/main.c
$ENV{SRC_DIR}/src/prog/chacond/src/ubus-model.c
$ENV{SRC_DIR}/src/prog/chacond/src/chacon.c
)
add_executable (
chacond
${source_files}
)
add_executable (chacond ${source_files})
target_link_libraries (chacond
LINK_PUBLIC
ubus
ubox
ubus
blobmsg_json
wiringPi
rt
pthread
)
)
install (TARGETS chacond DESTINATION local/bin)

View File

@@ -28,7 +28,7 @@
#include <stdio.h>
#include <unistd.h>
#include "UbusModel.h"
#include "ubus-model.h"
#include "chacon.h"

View File

@@ -29,6 +29,7 @@
#include <signal.h>
#include <libubox/blobmsg_json.h>
#include <libubus.h>
/*------------------------------- DECLARATION -------------------------------*/