From e341b7c0dc95abac38558d9ac054009619a4cce2 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 14 Jun 2020 17:49:47 +0200 Subject: [PATCH] fpga: update CMakeLists --- CMakeLists.txt | 7 +++++++ include/villas/node/config.h.in | 1 + lib/nodes/CMakeLists.txt | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cca55e2ad..74871f4d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ cmake_dependent_option(WITH_WEB "Build with internal webserver" cmake_dependent_option(WITH_API "Build with remote control API" ON "" OFF) cmake_dependent_option(WITH_CONFIG "Build with support for libconfig configuration syntax" ON "LIBCONFIG_FOUND" OFF) cmake_dependent_option(WITH_SRC "Build executables" ON "TOPLEVEL_PROJECT" OFF) +cmake_dependent_option(WITH_FPGA "Build with support for VILLASfpga" ON "" OFF) cmake_dependent_option(WITH_TOOLS "Build auxilary tools" ON "TOPLEVEL_PROJECT" OFF) cmake_dependent_option(WITH_TESTS "Run tests" ON "TOPLEVEL_PROJECT" OFF) cmake_dependent_option(WITH_PLUGINS "Build plugins" ON "TOPLEVEL_PROJECT" OFF) @@ -153,6 +154,7 @@ cmake_dependent_option(WITH_NODE_WEBSOCKET "Build with websocket node-type" cmake_dependent_option(WITH_NODE_ZEROMQ "Build with zeromq node-type" ON "LIBZMQ_FOUND" OFF) cmake_dependent_option(WITH_NODE_ETHERCAT "Build with ethercat node-type" ON "ETHERLAB_FOUND" OFF) cmake_dependent_option(WITH_NODE_EXAMPLE "Build with example node-type" ON "" OFF) +cmake_dependent_option(WITH_NODE_FPGA "Build with fpga node-type" ON "WITH_FPGA" OFF) # Add more build configurations include(cmake/config/Debug.cmake) @@ -170,6 +172,10 @@ add_subdirectory(web) add_subdirectory(packaging) add_subdirectory(python) +if(WITH_FPGA) + add_subdirectory(fpga) +endif() + if(WITH_SRC) add_subdirectory(src) endif() @@ -205,6 +211,7 @@ add_feature_info(WEB WITH_WEB "Build with add_feature_info(API WITH_API "Build with remote control API") add_feature_info(CONFIG WITH_CONFIG "Build with support for libconfig configuration syntax") add_feature_info(SRC WITH_SRC "Build executables") +add_feature_info(FPGA WITH_FPGA "Build with FPGA support") add_feature_info(TOOLS WITH_TOOLS "Build auxilary tools") add_feature_info(TESTS WITH_TESTS "Run tests") add_feature_info(PLUGINS WITH_PLUGINS "Build plugins") diff --git a/include/villas/node/config.h.in b/include/villas/node/config.h.in index d3764d56b..b2e7b443a 100644 --- a/include/villas/node/config.h.in +++ b/include/villas/node/config.h.in @@ -55,6 +55,7 @@ #cmakedefine WITH_HOOKS #cmakedefine WITH_CONFIG #cmakedefine WITH_GRAPHVIZ +#cmakedefine WITH_FPGA /* OS Headers */ #cmakedefine HAS_EVENTFD diff --git a/lib/nodes/CMakeLists.txt b/lib/nodes/CMakeLists.txt index 0bb619085..93475f650 100644 --- a/lib/nodes/CMakeLists.txt +++ b/lib/nodes/CMakeLists.txt @@ -164,6 +164,12 @@ if(WITH_NODE_ETHERCAT) list(APPEND LIBRARIES ${ETHERLAB_LIBRARIES}) endif() +# Enable VILLASfpga support +if(WITH_NODE_FPGA) + list(APPEND NODE_SRC villas_fpga.cpp) + list(APPEND LIBRARIES villas-fpga) +endif() + add_library(nodes STATIC ${NODE_SRC}) target_include_directories(nodes PUBLIC ${INCLUDE_DIRS}) target_link_libraries(nodes PUBLIC ${LIBRARIES})