Files
openairinterface5g/radio/vrtsim/CMakeLists.txt
T
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

66 lines
1.9 KiB
CMake

# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# Noise device static lib
add_library(noise_device STATIC noise_device.c)
target_link_libraries(noise_device PRIVATE log_headers)
# vrtsim module
add_library(vrtsim MODULE
vrtsim.c
cirdb_provider.c
cirdb_yaml.cpp
)
set_target_properties(vrtsim PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
find_package(yaml-cpp REQUIRED)
# Link libraries - always link yaml-cpp
target_link_libraries(vrtsim
PRIVATE
SIMU
shm_td_iq_channel
actor
noise_device
log_headers
pthread
yaml-cpp
)
# Optional taps client
add_boolean_option(OAI_VRTSIM_TAPS_CLIENT OFF "Enable taps client" ON)
if (OAI_VRTSIM_TAPS_CLIENT)
target_compile_definitions(vrtsim PRIVATE ENABLE_TAPS_CLIENT=1)
target_link_libraries(vrtsim PRIVATE taps_client)
file(DOWNLOAD
"https://gitlab.eurecom.fr/oai/raytracing-channel-emulator/-/raw/59589ad2a534881810b2aa7dd81e63066245bb8d/server/api/taps.fbs?inline=false"
${CMAKE_SOURCE_DIR}/taps.fbs
)
set(TAPS_IF_PATH ${CMAKE_SOURCE_DIR}/taps.fbs)
set(TAPS_API_HEADER taps_generated.h)
add_custom_command(OUTPUT ${TAPS_API_HEADER}
COMMAND flatc -c ${TAPS_IF_PATH}
DEPENDS ${TAPS_IF_PATH}
COMMENT "Generating flatbuffers API from ${TAPS_IF_PATH}"
)
add_library(taps_api INTERFACE)
target_include_directories(taps_api INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
add_library(taps_client taps_client.cpp ${TAPS_API_HEADER})
target_include_directories(taps_client PUBLIC .)
find_package(FlatBuffers QUIET)
if(NOT FlatBuffers_FOUND)
# Fall back to lowercase (Ubuntu 22.04)
find_package(Flatbuffers REQUIRED)
set(FLATBUFFERS_TARGET flatbuffers)
else()
set(FLATBUFFERS_TARGET flatbuffers::flatbuffers)
endif()
target_link_libraries(taps_client PUBLIC ${FLATBUFFERS_TARGET})
target_link_libraries(taps_client PUBLIC flatbuffers taps_api SIMU nanomsg)
endif()