Link targets that need RRC ASN.1 headers to header-only library
Most targets don't need the symbols from the compiled RRC ASN.1 libraries, but only the headers. In particular when compiling individual libraries (e.g., for tests), linking the full library makes the RRC ASN.1 libraries compile and link, when they are not needed (only headers are needed). For libraries that can do without these headers, don't link them.
This commit is contained in:
@@ -35,7 +35,7 @@ add_library(telnetsrv MODULE
|
||||
telnetsrv_measurements.c
|
||||
)
|
||||
target_link_libraries(telnetsrv PRIVATE history)
|
||||
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
message(STATUS "Add enb specific telnet functions in libtelnetsrv_enb.so")
|
||||
add_library(telnetsrv_enb MODULE
|
||||
@@ -43,7 +43,7 @@ add_library(telnetsrv_enb MODULE
|
||||
telnetsrv_enb_phycmd.c
|
||||
)
|
||||
add_dependencies(telnetsrv telnetsrv_enb)
|
||||
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
message(STATUS "No specific telnet functions for gnb")
|
||||
|
||||
@@ -52,7 +52,7 @@ message(STATUS "No specific telnet functions for 4Gue")
|
||||
message(STATUS "Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so")
|
||||
add_library(telnetsrv_5Gue MODULE telnetsrv_5Gue_measurements.c)
|
||||
add_dependencies(telnetsrv telnetsrv_5Gue)
|
||||
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
# all libraries should be written to root build dir
|
||||
set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue
|
||||
|
||||
@@ -62,7 +62,6 @@ add_library(websrv MODULE
|
||||
websrv_utils.c
|
||||
../../../openair1/PHY/TOOLS/nr_phy_scope.c
|
||||
)
|
||||
target_link_libraries(websrv PRIVATE asn1_lte_rrc asn1_nr_rrc)
|
||||
target_link_libraries(websrv PRIVATE ulfius jansson)
|
||||
target_compile_definitions(websrv PUBLIC WEBSRVSCOPE)
|
||||
# put websrv into build root and not under build/common/utils/websrv/
|
||||
|
||||
Reference in New Issue
Block a user