1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/lib/nodes/CMakeLists.txt

173 lines
4.5 KiB
Text
Raw Permalink Normal View History

2018-06-21 09:36:49 +02:00
# CMakeLists.
#
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
2020-01-20 17:17:00 +01:00
# @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
2018-06-21 09:36:49 +02:00
# @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/>.
###################################################################################
set(NODE_SRC
loopback_internal.cpp
)
2018-06-21 09:36:49 +02:00
2018-06-25 09:44:58 +02:00
if(LIBNL3_ROUTE_FOUND)
list(APPEND LIBRARIES PkgConfig::LIBNL3_ROUTE)
endif()
if(WITH_NODE_INFLUXDB)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC influxdb.cpp)
endif()
if(WITH_NODE_STATS)
2019-04-07 15:13:40 +02:00
list(APPEND NODE_SRC stats.cpp)
endif()
if(WITH_NODE_SIGNAL)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC signal_generator.cpp)
endif()
if(WITH_NODE_LOOPBACK)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC loopback.cpp)
endif()
if(WITH_NODE_TEST_RTT)
2019-04-08 08:59:51 +02:00
list(APPEND NODE_SRC test_rtt.cpp)
endif()
if(WITH_NODE_SOCKET)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC socket.cpp)
endif()
if(WITH_NODE_FILE)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC file.cpp)
2018-06-25 09:44:58 +02:00
endif()
2019-06-05 18:59:45 +02:00
if(WITH_NODE_EXEC)
list(APPEND NODE_SRC exec.cpp)
endif()
2018-09-24 21:24:20 +02:00
# Enable Universal Library for Linux DAQ devices (libuldaq)
if(WITH_NODE_ULDAQ)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC uldaq.cpp)
list(APPEND LIBRARIES PkgConfig::LIBULDAQ)
2018-09-24 21:24:20 +02:00
endif()
2018-06-25 09:44:58 +02:00
# Enable shared memory node-type
if(WITH_NODE_SHMEM)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC shmem.cpp)
2018-06-25 09:44:58 +02:00
endif()
# Enable IEC61850 node-types when libiec61850 is available
if(WITH_NODE_IEC61850)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC iec61850_sv.cpp iec61850.cpp)
list(APPEND LIBRARIES PkgConfig::LIBIEC61850)
2018-06-25 09:44:58 +02:00
endif()
# Enable OPAL-RT Asynchronous Process support (will result in 32bit binary!!!)
if(WITH_NODE_OPAL)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC opal.cpp)
2018-06-25 09:44:58 +02:00
list(APPEND INCLUDE_DIRS ${OPAL_INCLUDE_DIRS})
list(APPEND LIBRARIES ${OPAL_LIBRARIES})
endif()
# Enable nanomsg node type when libnanomsg is available
if(WITH_NODE_NANOMSG)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC nanomsg.cpp)
list(APPEND LIBRARIES PkgConfig::NANOMSG)
2018-06-25 09:44:58 +02:00
endif()
# Enable ZeroMQ node type when libzmq is available
if(WITH_NODE_ZEROMQ)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC zeromq.cpp)
2018-06-25 09:44:58 +02:00
list(APPEND LIBRARIES PkgConfig::LIBZMQ)
endif()
# Enable NGSI support
if(WITH_NODE_NGSI)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC ngsi.cpp)
list(APPEND INCLUDE_DIRECTORIES ${CURL_INCLUDE_DIRS})
list(APPEND LIBRARIES ${CURL_LIBRARIES})
endif()
2018-06-25 09:44:58 +02:00
# Enable WebSocket support
if(WITH_NODE_WEBSOCKET)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC websocket.cpp)
list(APPEND LIBRARIES PkgConfig::LIBWEBSOCKETS)
2018-06-25 09:44:58 +02:00
endif()
# Enable AMQP support
if(WITH_NODE_AMQP)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC amqp.cpp)
2018-06-25 09:44:58 +02:00
list(APPEND LIBRARIES PkgConfig::RABBITMQ_C)
endif()
# Enable MQTT support
if(WITH_NODE_MQTT)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC mqtt.cpp)
list(APPEND LIBRARIES PkgConfig::MOSQUITTO)
2018-06-25 09:44:58 +02:00
endif()
# Enable Comedi support
if(WITH_NODE_COMEDI)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC comedi.cpp)
2018-06-25 09:44:58 +02:00
list(APPEND INCLUDE_DIRS ${COMEDILIB_INCLUDE_DIRS})
2020-12-04 13:55:22 +01:00
list(APPEND LIBRARIES ${COMEDILIB_LDFLAGS})
2018-06-25 09:44:58 +02:00
endif()
# Enable Infiniband support
if(WITH_NODE_INFINIBAND)
2019-04-22 23:43:46 +02:00
list(APPEND NODE_SRC infiniband.cpp)
list(APPEND INCLUDE_DIRS ${IBVERBS_INCLUDE_DIRS} ${RDMACM_INCLUDE_DIRS})
list(APPEND LIBRARIES ${IBVERBS_LIBRARIES} ${RDMACM_LIBRARIES})
endif()
# Enable RTP node type when libre is available
if(WITH_NODE_RTP)
2019-03-26 15:34:07 +01:00
list(APPEND NODE_SRC rtp.cpp)
list(APPEND LIBRARIES PkgConfig::RE)
endif()
2020-01-21 19:34:23 +01:00
# Enable CAN node type
if(WITH_NODE_CAN)
list(APPEND NODE_SRC can.cpp)
endif()
# Enable Example node type
if(WITH_NODE_EXAMPLE)
list(APPEND NODE_SRC example.cpp)
# Add your library dependencies for the new node-type here
# list(APPEND LIBRARIES PkgConfig::EXAMPLELIB)
endif()
# Enable Ethercat support
if(WITH_NODE_ETHERCAT)
2020-01-25 17:38:22 +01:00
list(APPEND NODE_SRC ethercat.cpp)
2020-01-20 14:03:49 +01:00
list(APPEND INCLUDE_DIRS ${ETHERLAB_INCLUDE_DIRS})
list(APPEND LIBRARIES ${ETHERLAB_LIBRARIES})
endif()
2020-06-14 17:49:47 +02:00
# Enable VILLASfpga support
if(WITH_NODE_FPGA)
list(APPEND NODE_SRC fpga.cpp)
list(APPEND INCLUDE_DIRS $<TARGET_PROPERTY:villas-fpga,INCLUDE_DIRECTORIES>)
2020-06-14 17:49:47 +02:00
endif()
add_library(nodes STATIC ${NODE_SRC})
target_include_directories(nodes PUBLIC ${INCLUDE_DIRS})
2020-06-14 15:02:16 +02:00
target_link_libraries(nodes PUBLIC ${LIBRARIES})