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)
|
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/
|
||||||
)
|
# )
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#include <CivetServer.h>
|
#include <civetweb/CivetServer.h>
|
||||||
|
|
||||||
/*--------------------------------- Define ----------------------------------*/
|
/*--------------------------------- Define ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
/*-------------------------------- INCLUDES ---------------------------------*/
|
/*-------------------------------- INCLUDES ---------------------------------*/
|
||||||
|
|
||||||
#include <CivetServer.h>
|
#include <civetweb/CivetServer.h>
|
||||||
|
|
||||||
/*---------------------------------- CLASS ----------------------------------*/
|
/*---------------------------------- CLASS ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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 ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user