Fix Compilation of restd.

This commit is contained in:
jbnadal
2017-06-07 16:55:05 +02:00
parent 5d7856ea1f
commit f4bf901f9a
5 changed files with 29 additions and 31 deletions

View File

@@ -1,46 +1,44 @@
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 3.0)
project(restd) project(restd)
include (libcivetweb) set (CMAKE_MODULE_PATH "${MODULE_PATH}")
include (libjsoncpp) set (CMAKE_CXX_STANDARD 11)
include (libubus)
include (libubox)
include (libubuscpp)
include_directories(../../src) include (br)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -pedantic -Werror=strict-aliasing") include_directories ($ENV{SRC_DIR}/src/prog/restd/src/)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")
file ( file (
GLOB_RECURSE GLOB_RECURSE
source_files source_files
../../src/main.cpp $ENV{SRC_DIR}/src/prog/restd/src/main.cpp
../../src/authorize.cpp $ENV{SRC_DIR}/src/prog/restd/src/authorize.cpp
../../src/session.cpp $ENV{SRC_DIR}/src/prog/restd/src/session.cpp
../../src/message.cpp $ENV{SRC_DIR}/src/prog/restd/src/message.cpp
../../src/routes/ExitHandler.cpp $ENV{SRC_DIR}/src/prog/restd/src/routes/ExitHandler.cpp
../../src/routes/UbusHandler.cpp $ENV{SRC_DIR}/src/prog/restd/src/routes/UbusHandler.cpp
) )
add_executable ( add_executable (restd ${source_files})
restd
${source_files}
)
target_link_libraries (restd target_link_libraries (restd
LINK_PUBLIC LINK_PUBLIC
civetweb pthread
ubus
ubuscpp
dl dl
crypt crypt
jsoncpp ubus
ubus-cpp
json-cpp
civetweb-cpp
) )
install (TARGETS restd DESTINATION local/bin)
add_custom_command( #add_custom_command(
TARGET restd # TARGET restd
POST_BUILD # POST_BUILD
COMMAND cp ${CMAKE_SOURCE_DIR}/certificate/ssl_cert.pem ${CMAKE_SOURCE_DIR}/build/ # COMMAND cp ${CMAKE_SOURCE_DIR}/certificate/ssl_cert.pem ${CMAKE_SOURCE_DIR}/build/
) # )

View File

@@ -30,7 +30,7 @@
#include <pthread.h> #include <pthread.h>
#include <CivetServer.h> #include <civetweb/CivetServer.h>
/*--------------------------------- Define ----------------------------------*/ /*--------------------------------- Define ----------------------------------*/

View File

@@ -28,7 +28,7 @@
/*-------------------------------- INCLUDES ---------------------------------*/ /*-------------------------------- INCLUDES ---------------------------------*/
#include <CivetServer.h> #include <civetweb/CivetServer.h>
/*---------------------------------- CLASS ----------------------------------*/ /*---------------------------------- CLASS ----------------------------------*/

View File

@@ -29,7 +29,7 @@
#include <jsoncpp/reader.h> #include <jsoncpp/reader.h>
#include <ubuscpp/UBusCall.h> #include <ubus-cpp/UBusCall.h>
#include "UbusHandler.h" #include "UbusHandler.h"

View File

@@ -31,7 +31,7 @@
#include <string.h> #include <string.h>
#include <jsoncpp/json.h> #include <jsoncpp/json.h>
#include <CivetServer.h> #include <civetweb/CivetServer.h>
/*---------------------------------- CLASS ----------------------------------*/ /*---------------------------------- CLASS ----------------------------------*/