2018-06-25 17:03:09 +02:00
|
|
|
## CMakeLists.txt
|
|
|
|
#
|
2023-01-07 17:20:15 +01:00
|
|
|
# Author: Daniel Krebs <github@daniel-krebs.net>
|
2023-09-08 11:35:18 +02:00
|
|
|
# SPDX-FileCopyrightText: 2018 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
2023-01-07 17:20:15 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-06-25 17:03:09 +02:00
|
|
|
|
2017-11-21 21:31:08 +01:00
|
|
|
set(SOURCES
|
2024-02-29 21:40:05 +01:00
|
|
|
vlnv.cpp
|
|
|
|
card.cpp
|
|
|
|
pcie_card.cpp
|
|
|
|
core.cpp
|
|
|
|
node.cpp
|
|
|
|
utils.cpp
|
|
|
|
dma.cpp
|
2017-11-21 21:31:08 +01:00
|
|
|
|
2024-02-29 21:40:05 +01:00
|
|
|
ips/aurora_xilinx.cpp
|
|
|
|
ips/aurora.cpp
|
|
|
|
ips/bram.cpp
|
|
|
|
ips/dino.cpp
|
|
|
|
ips/dma.cpp
|
|
|
|
ips/emc.cpp
|
|
|
|
ips/fifo.cpp
|
|
|
|
ips/gpio.cpp
|
|
|
|
ips/intc.cpp
|
|
|
|
ips/pcie.cpp
|
|
|
|
ips/rtds.cpp
|
|
|
|
ips/switch.cpp
|
|
|
|
ips/timer.cpp
|
|
|
|
ips/i2c.cpp
|
|
|
|
ips/register.cpp
|
2024-10-27 10:39:16 +01:00
|
|
|
ips/axis_cache.cpp
|
2018-02-13 14:13:14 +01:00
|
|
|
|
2024-02-29 21:40:05 +01:00
|
|
|
ips/rtds2gpu/rtds2gpu.cpp
|
|
|
|
ips/rtds2gpu/xrtds2gpu.c
|
|
|
|
ips/rtds2gpu/gpu2rtds.cpp
|
2017-11-21 21:31:08 +01:00
|
|
|
)
|
|
|
|
|
2018-05-29 12:28:09 +02:00
|
|
|
# we don't have much influence on drivers generated by Xilinx, so ignore warnings
|
|
|
|
set_source_files_properties(ips/rtds2gpu/xrtds2gpu.c
|
2024-02-29 21:40:05 +01:00
|
|
|
PROPERTIES COMPILE_FLAGS -Wno-int-to-pointer-cast)
|
2018-05-29 12:28:09 +02:00
|
|
|
|
2017-11-22 19:36:03 +01:00
|
|
|
add_library(villas-fpga SHARED ${SOURCES})
|
2017-11-21 21:31:08 +01:00
|
|
|
|
2018-04-13 16:09:02 +02:00
|
|
|
target_link_libraries(villas-fpga PUBLIC villas-common)
|
2018-05-16 10:58:18 +02:00
|
|
|
|
2017-11-21 21:31:08 +01:00
|
|
|
target_compile_definitions(villas-fpga PRIVATE
|
2024-02-29 21:40:05 +01:00
|
|
|
BUILDID=\"abc\"
|
|
|
|
_GNU_SOURCE
|
2017-11-21 21:31:08 +01:00
|
|
|
)
|
|
|
|
|
2018-06-04 14:05:02 +02:00
|
|
|
target_include_directories(villas-fpga
|
2024-02-29 21:40:05 +01:00
|
|
|
PUBLIC
|
|
|
|
${PROJECT_BINARY_DIR}/include
|
|
|
|
${PROJECT_SOURCE_DIR}/fpga/include
|
|
|
|
${JANSSON_INCLUDE_DIRS}
|
2017-11-21 21:31:08 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(villas-fpga PUBLIC
|
2024-02-29 21:40:05 +01:00
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
m
|
|
|
|
xil
|
|
|
|
villas-common
|
|
|
|
"$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>"
|
2017-11-21 21:31:08 +01:00
|
|
|
)
|
2018-04-05 11:29:16 +02:00
|
|
|
|
2018-08-21 15:53:47 +02:00
|
|
|
if(CMAKE_CUDA_COMPILER)
|
2024-02-29 21:40:05 +01:00
|
|
|
target_link_libraries(villas-fpga PUBLIC villas-gpu)
|
2018-08-21 15:53:47 +02:00
|
|
|
endif()
|
|
|
|
|
2018-04-05 11:29:16 +02:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
install(TARGETS villas-fpga
|
2024-02-29 21:40:05 +01:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static
|
2018-04-05 11:29:16 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
install(DIRECTORY ../include/villas DESTINATION include)
|