Commit 4384ea2b authored by Rúben Soares da Silva's avatar Rúben Soares da Silva Committed by Rúben Soares Silva

Properly add compile definitions related to aerial_lib into targets that ...

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
parent 612e6bbc
...@@ -779,7 +779,9 @@ set(NFAPI_VNF_SRC ...@@ -779,7 +779,9 @@ set(NFAPI_VNF_SRC
) )
add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC}) add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC})
target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(OAI_AERIAL)
target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_AERIAL)
endif()
include_directories(${NFAPI_DIR}/vnf/public_inc) include_directories(${NFAPI_DIR}/vnf/public_inc)
include_directories(${NFAPI_DIR}/vnf/inc) include_directories(${NFAPI_DIR}/vnf/inc)
...@@ -1475,6 +1477,9 @@ add_library(e1_if ...@@ -1475,6 +1477,9 @@ add_library(e1_if
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U) target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_common) target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_common)
if(OAI_AERIAL)
target_compile_definitions(L2_NR PRIVATE ENABLE_AERIAL)
endif()
if(E2_AGENT) if(E2_AGENT)
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup) target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
...@@ -2092,6 +2097,11 @@ target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp) ...@@ -2092,6 +2097,11 @@ target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
target_link_libraries(nr-softmodem PRIVATE ${T_LIB}) target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
if (OAI_AERIAL)
target_compile_definitions(nr-softmodem PUBLIC ENABLE_AERIAL)
target_link_libraries(nr-softmodem PUBLIC aerial_lib)
endif()
if(E2_AGENT) if(E2_AGENT)
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif() endif()
......
include(oai_integration/aerial/CMakeLists.txt) add_subdirectory(oai_integration/aerial)
add_subdirectory(open-nFAPI) add_subdirectory(open-nFAPI)
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
if (OAI_AERIAL) if (OAI_AERIAL)
message(STATUS "Building with support for Aerial") message(STATUS "Building with support for Aerial")
add_library(aerial_lib
target_sources( fapi_nvIPC.c
nr-softmodem fapi_vnf_p7.c
PRIVATE fapi_vnf_p5.c
${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 )
find_library(NVIPC_LIB nvipc REQUIRED) find_library(NVIPC_LIB nvipc REQUIRED)
if (NOT NVIPC_LIB) if (NOT NVIPC_LIB)
message(FATAL_ERROR "-- nvipc library not found") message(FATAL_ERROR "-- nvipc library not found")
else () else ()
message(STATUS " nvipc library found in ${NVIPC_LIB}") message(STATUS " nvipc library found in ${NVIPC_LIB}")
#add_library(nvipc STATIC SHARED IMPORTED GLOBAL)
endif () endif ()
find_library(NVLOG_LIB nvlog REQUIRED) find_library(NVLOG_LIB nvlog REQUIRED)
...@@ -23,11 +19,9 @@ if (OAI_AERIAL) ...@@ -23,11 +19,9 @@ if (OAI_AERIAL)
else () else ()
message(STATUS " nvlog library found in ${NVLOG_LIB}") message(STATUS " nvlog library found in ${NVLOG_LIB}")
endif () endif ()
target_compile_definitions(aerial_lib PUBLIC ENABLE_L2_SLT_RSP ENABLE_AERIAL)
add_compile_definitions(ENABLE_L2_SLT_RSP) target_link_libraries(aerial_lib PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_compile_definitions(FAPI_BYTE_ORDERING_BIG_ENDIAN) target_link_libraries(aerial_lib PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}")
add_compile_definitions(ENABLE_AERIAL) else ()
target_link_libraries(nr-softmodem PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}")
else()
message(STATUS "No Support for Aerial") message(STATUS "No Support for Aerial")
endif() endif ()
\ No newline at end of file
...@@ -2,3 +2,6 @@ add_library(nfapi_common ...@@ -2,3 +2,6 @@ add_library(nfapi_common
src/debug.c src/debug.c
src/nfapi.c) src/nfapi.c)
target_include_directories(nfapi_common PUBLIC public_inc/) target_include_directories(nfapi_common PUBLIC public_inc/)
if (OAI_AERIAL)
target_compile_definitions(nfapi_common PRIVATE FAPI_BYTE_ORDERING_BIG_ENDIAN)
endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment