Properly add compile definitions related to aerial_lib into targets that depend on it ( ENABLE_AERIAL )
Add target_compile_definitions to L2_NR library in order to propagate #define in gnb_config.c
This commit is contained in:
committed by
Rúben Soares Silva
parent
612e6bbc3d
commit
4384ea2b59
@@ -1,2 +1,2 @@
|
||||
include(oai_integration/aerial/CMakeLists.txt)
|
||||
add_subdirectory(oai_integration/aerial)
|
||||
add_subdirectory(open-nFAPI)
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
|
||||
if (OAI_AERIAL)
|
||||
message(STATUS "Building with support for Aerial")
|
||||
|
||||
target_sources(
|
||||
nr-softmodem
|
||||
PRIVATE
|
||||
${OPENAIR_DIR}/nfapi/oai_integration/aerial/fapi_nvIPC.c
|
||||
${OPENAIR_DIR}/nfapi/oai_integration/aerial/fapi_vnf_p7.c
|
||||
${OPENAIR_DIR}/nfapi/oai_integration/aerial/fapi_vnf_p5.c )
|
||||
add_library(aerial_lib
|
||||
fapi_nvIPC.c
|
||||
fapi_vnf_p7.c
|
||||
fapi_vnf_p5.c
|
||||
)
|
||||
|
||||
find_library(NVIPC_LIB nvipc REQUIRED)
|
||||
if (NOT NVIPC_LIB)
|
||||
message(FATAL_ERROR "-- nvipc library not found")
|
||||
else ()
|
||||
message(STATUS " nvipc library found in ${NVIPC_LIB}")
|
||||
#add_library(nvipc STATIC SHARED IMPORTED GLOBAL)
|
||||
endif ()
|
||||
|
||||
find_library(NVLOG_LIB nvlog REQUIRED)
|
||||
@@ -23,11 +19,9 @@ if (OAI_AERIAL)
|
||||
else ()
|
||||
message(STATUS " nvlog library found in ${NVLOG_LIB}")
|
||||
endif ()
|
||||
|
||||
add_compile_definitions(ENABLE_L2_SLT_RSP)
|
||||
add_compile_definitions(FAPI_BYTE_ORDERING_BIG_ENDIAN)
|
||||
add_compile_definitions(ENABLE_AERIAL)
|
||||
target_link_libraries(nr-softmodem PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}")
|
||||
else()
|
||||
target_compile_definitions(aerial_lib PUBLIC ENABLE_L2_SLT_RSP ENABLE_AERIAL)
|
||||
target_link_libraries(aerial_lib PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
target_link_libraries(aerial_lib PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}")
|
||||
else ()
|
||||
message(STATUS "No Support for Aerial")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
@@ -2,3 +2,6 @@ add_library(nfapi_common
|
||||
src/debug.c
|
||||
src/nfapi.c)
|
||||
target_include_directories(nfapi_common PUBLIC public_inc/)
|
||||
if (OAI_AERIAL)
|
||||
target_compile_definitions(nfapi_common PRIVATE FAPI_BYTE_ORDERING_BIG_ENDIAN)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user