mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge branch 'cmake-include' into develop
This commit is contained in:
commit
7936b0f626
14 changed files with 28 additions and 87 deletions
|
@ -130,7 +130,7 @@ set(PROJECT_SOVERSION 1)
|
|||
|
||||
execute_process(
|
||||
COMMAND git describe --tags --abbrev=0 --match "v*"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE PROJECT_VERSION_STR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
@ -149,14 +149,14 @@ if(DEFINED ENV{CI})
|
|||
else()
|
||||
execute_process(
|
||||
COMMAND git rev-parse --short=7 HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_REV
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
@ -173,11 +173,6 @@ endif()
|
|||
|
||||
set(BUILDID "v${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}-${GIT_REV}-${VARIANT}")
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_BINARY_DIR}/include
|
||||
)
|
||||
|
||||
add_subdirectory(etc)
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
||||
|
@ -205,8 +200,8 @@ if(WITH_TESTS)
|
|||
endif()
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/include/villas/config.h.in
|
||||
${CMAKE_BINARY_DIR}/include/villas/config.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/villas/config.h
|
||||
)
|
||||
|
||||
# Show feature summary
|
||||
|
|
|
@ -61,8 +61,8 @@ set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
|
|||
set(CPACK_RPM_PACKAGE_URL "http://www.fein-aachen.org/projects/villas-node/")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.md")
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${VILLASnode_SOURCE_DIR}/COPYING.md")
|
||||
set(CPACK_RESOURCE_FILE_README "${VILLASnode_SOURCE_DIR}/README.md")
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES "build/;\\\\.gitmodules;\\\\.git/;\\\\.vscode;\\\\.editorconfig;\\\\.gitlab-ci.yml;\\\\.(docker|git)ignore;\\\\.DS_Store")
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ if(DOXYGEN_FOUND)
|
|||
|
||||
doxygen_add_docs(doc
|
||||
README.md CONTRIBUTING.md COPYING.md src/ lib/ tests/ include/ doc/
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${PROJECT_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
|
|
|
@ -97,10 +97,10 @@ int comedi_start(struct node *n);
|
|||
int comedi_stop(struct node *n);
|
||||
|
||||
/** @see node_type::read */
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt);
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release);
|
||||
|
||||
/** @see node_type::write */
|
||||
int comedi_write(struct node *n, struct sample *smps[], unsigned cnt);
|
||||
int comedi_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
@ -22,10 +22,12 @@
|
|||
|
||||
add_compile_options(-fPIC)
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
list(APPEND INCLUDE_DIRS
|
||||
${JANSSON_INCLUDE_DIRS}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${CURL_INCLUDE_DIRS}
|
||||
${VILLASnode_BINARY_DIR}/include
|
||||
${VILLASnode_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
|
|
|
@ -21,14 +21,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
${OPENSSL_LIBRARIES}
|
||||
)
|
||||
|
||||
set(API_SRC
|
||||
session.c
|
||||
actions/capabiltities.c
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
set(FORMAT_SRC
|
||||
list(APPEND FORMAT_SRC
|
||||
json.c
|
||||
json_reserve.c
|
||||
villas_binary.c
|
||||
|
@ -30,14 +30,6 @@ set(FORMAT_SRC
|
|||
msg.c
|
||||
)
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
${OPENSSL_LIBRARIES}
|
||||
)
|
||||
|
||||
# Enable Google Protobuf format
|
||||
if(PROTOBUFC_FOUND)
|
||||
list(APPEND FORMAT_SRC
|
||||
|
|
|
@ -20,14 +20,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
${JANSSON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
PkgConfig::JANSSON
|
||||
)
|
||||
|
||||
set(HOOK_SRC
|
||||
convert.c
|
||||
decimate.c
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
# Makefile.
|
||||
#
|
||||
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
# @license GNU General Public License (version 3)
|
||||
#
|
||||
# VILLASnode
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
LIB_SRCS += $(addprefix lib/kernel/, kernel.c rt.c)
|
|
@ -20,14 +20,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
${JANSSON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(LIBRARIES
|
||||
PkgConfig::JANSSON
|
||||
)
|
||||
|
||||
set(NODE_SRC
|
||||
influxdb.c
|
||||
stats.c
|
||||
|
|
|
@ -523,7 +523,7 @@ int comedi_stop(struct node *n)
|
|||
|
||||
#if COMEDI_USE_READ
|
||||
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt)
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release)
|
||||
{
|
||||
int ret;
|
||||
struct comedi *c = (struct comedi *) n->_vd;
|
||||
|
@ -646,7 +646,7 @@ int comedi_read(struct node *n, struct sample *smps[], unsigned cnt)
|
|||
|
||||
#else
|
||||
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt)
|
||||
int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release)
|
||||
{
|
||||
int ret;
|
||||
struct comedi *c = (struct comedi *) n->_vd;
|
||||
|
@ -831,7 +831,7 @@ int comedi_read(struct node *n, struct sample *smps[], unsigned cnt)
|
|||
|
||||
#endif
|
||||
|
||||
int comedi_write(struct node *n, struct sample *smps[], unsigned cnt)
|
||||
int comedi_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release)
|
||||
{
|
||||
int ret;
|
||||
struct comedi *c = (struct comedi *) n->_vd;
|
||||
|
|
|
@ -391,16 +391,16 @@ int mqtt_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if(m->publish) {
|
||||
ret = mosquitto_publish(m->client, NULL /* mid */, m->publish, wbytes, data, m->qos,
|
||||
if (m->publish) {
|
||||
ret = mosquitto_publish(m->client, NULL /* mid */, m->publish, wbytes, data, m->qos,
|
||||
m->retain);
|
||||
if (ret != MOSQ_ERR_SUCCESS) {
|
||||
warn("MQTT: publish failed for node %s: %s", node_name(n), mosquitto_strerror(ret));
|
||||
return -abs(ret);
|
||||
}
|
||||
}
|
||||
else{
|
||||
warn("MQTT: no publish for node %s possible because no publish topic is given", node_name(n));
|
||||
if (ret != MOSQ_ERR_SUCCESS) {
|
||||
warn("MQTT: publish failed for node %s: %s", node_name(n), mosquitto_strerror(ret));
|
||||
return -abs(ret);
|
||||
}
|
||||
}
|
||||
else {
|
||||
warn("MQTT: no publish for node %s possible because no publish topic is given", node_name(n));
|
||||
}
|
||||
|
||||
return cnt;
|
||||
|
|
|
@ -33,7 +33,7 @@ set(DOCKER_RUN_OPTS
|
|||
--publish 2345:2345
|
||||
--privileged
|
||||
--security-opt seccomp:unconfined
|
||||
--volume \"${CMAKE_SOURCE_DIR}:/villas\"
|
||||
--volume \"${VILLASnode_SOURCE_DIR}:/villas\"
|
||||
)
|
||||
|
||||
foreach(SUFFIX app dev dev-centos dev-ubuntu)
|
||||
|
@ -59,7 +59,7 @@ foreach(SUFFIX app dev dev-centos dev-ubuntu)
|
|||
--build-arg GIT_REV=${GIT_REV}
|
||||
--build-arg VERSION=${PROJECT_VERSION}
|
||||
--build-arg VARIANT=${VARIANT}
|
||||
${DOCKER_BUILD_OPTS} ${CMAKE_SOURCE_DIR}
|
||||
${DOCKER_BUILD_OPTS} ${VILLASnode_SOURCE_DIR}
|
||||
COMMENT "Build Docker image: ${DOCKER_IMAGE}-${SUFFIX}:${DOCKER_TAG}"
|
||||
)
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
# Plugins
|
||||
link_libraries(villas)
|
||||
include_directories("${CMAKE_SOURCE_DIR}/include")
|
||||
add_definitions("-DVILLAS")
|
||||
|
||||
add_library(simple_circuit MODULE models/simple_circuit.c)
|
||||
|
|
Loading…
Add table
Reference in a new issue