Fix Compilation of restd.
This commit is contained in:
@@ -1,46 +1,44 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(restd)
|
||||
|
||||
include (libcivetweb)
|
||||
include (libjsoncpp)
|
||||
include (libubus)
|
||||
include (libubox)
|
||||
include (libubuscpp)
|
||||
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
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 (
|
||||
GLOB_RECURSE
|
||||
source_files
|
||||
../../src/main.cpp
|
||||
../../src/authorize.cpp
|
||||
../../src/session.cpp
|
||||
../../src/message.cpp
|
||||
../../src/routes/ExitHandler.cpp
|
||||
../../src/routes/UbusHandler.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/main.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/authorize.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/session.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/message.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/routes/ExitHandler.cpp
|
||||
$ENV{SRC_DIR}/src/prog/restd/src/routes/UbusHandler.cpp
|
||||
)
|
||||
|
||||
add_executable (
|
||||
restd
|
||||
${source_files}
|
||||
)
|
||||
add_executable (restd ${source_files})
|
||||
|
||||
target_link_libraries (restd
|
||||
LINK_PUBLIC
|
||||
civetweb
|
||||
ubus
|
||||
ubuscpp
|
||||
pthread
|
||||
dl
|
||||
crypt
|
||||
jsoncpp
|
||||
ubus
|
||||
ubus-cpp
|
||||
json-cpp
|
||||
civetweb-cpp
|
||||
)
|
||||
|
||||
install (TARGETS restd DESTINATION local/bin)
|
||||
|
||||
add_custom_command(
|
||||
TARGET restd
|
||||
POST_BUILD
|
||||
COMMAND cp ${CMAKE_SOURCE_DIR}/certificate/ssl_cert.pem ${CMAKE_SOURCE_DIR}/build/
|
||||
)
|
||||
#add_custom_command(
|
||||
# TARGET restd
|
||||
# POST_BUILD
|
||||
# COMMAND cp ${CMAKE_SOURCE_DIR}/certificate/ssl_cert.pem ${CMAKE_SOURCE_DIR}/build/
|
||||
# )
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <CivetServer.h>
|
||||
#include <civetweb/CivetServer.h>
|
||||
|
||||
/*--------------------------------- Define ----------------------------------*/
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/*-------------------------------- INCLUDES ---------------------------------*/
|
||||
|
||||
#include <CivetServer.h>
|
||||
#include <civetweb/CivetServer.h>
|
||||
|
||||
/*---------------------------------- CLASS ----------------------------------*/
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <jsoncpp/reader.h>
|
||||
|
||||
#include <ubuscpp/UBusCall.h>
|
||||
#include <ubus-cpp/UBusCall.h>
|
||||
|
||||
#include "UbusHandler.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <jsoncpp/json.h>
|
||||
|
||||
#include <CivetServer.h>
|
||||
#include <civetweb/CivetServer.h>
|
||||
|
||||
/*---------------------------------- CLASS ----------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user