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

89 lines
2.2 KiB
CMake

## CMakeLists.txt
#
# @author Daniel Krebs <github@daniel-krebs.net>
# @copyright 2018-2022, Institute for Automation of Complex Power Systems, EONERC
# @license GNU General Public License (version 3)
#
# VILLASfpga
#
# 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(SOURCES
vlnv.cpp
card.cpp
core.cpp
node.cpp
fpgaHelper.cpp
ips/timer.cpp
ips/switch.cpp
ips/emc.cpp
ips/fifo.cpp
ips/intc.cpp
ips/pcie.cpp
ips/dma.cpp
ips/bram.cpp
ips/rtds.cpp
ips/aurora.cpp
ips/aurora_xilinx.cpp
ips/gpio.cpp
ips/rtds2gpu/rtds2gpu.cpp
ips/rtds2gpu/xrtds2gpu.c
ips/rtds2gpu/gpu2rtds.cpp
)
# we don't have much influence on drivers generated by Xilinx, so ignore warnings
set_source_files_properties(ips/rtds2gpu/xrtds2gpu.c
PROPERTIES COMPILE_FLAGS -Wno-int-to-pointer-cast)
add_library(villas-fpga SHARED ${SOURCES})
target_link_libraries(villas-fpga PUBLIC villas-common)
target_compile_definitions(villas-fpga PRIVATE
BUILDID=\"abc\"
_GNU_SOURCE
)
target_include_directories(villas-fpga
PUBLIC
${PROJECT_BINARY_DIR}/include
${PROJECT_SOURCE_DIR}/include
${JANSSON_INCLUDE_DIRS}
)
target_link_libraries(villas-fpga PUBLIC
${JANSSON_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
m
xil
villas-common
)
if(CMAKE_CUDA_COMPILER)
target_link_libraries(villas-fpga PUBLIC villas-gpu)
endif()
include(GNUInstallDirs)
install(TARGETS villas-fpga
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static
)
install(DIRECTORY ../include/villas DESTINATION include)