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

fpga: update CMakeLists

This commit is contained in:
Steffen Vogel 2020-06-14 17:49:47 +02:00
parent 942aff3c59
commit e341b7c0dc
3 changed files with 14 additions and 0 deletions

View file

@ -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")

View file

@ -55,6 +55,7 @@
#cmakedefine WITH_HOOKS
#cmakedefine WITH_CONFIG
#cmakedefine WITH_GRAPHVIZ
#cmakedefine WITH_FPGA
/* OS Headers */
#cmakedefine HAS_EVENTFD

View file

@ -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})