[M-plane] Support xran K release if xran_DOWNLOAD=ON

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: e7c4d80a5d ("Create a cmake API for O_RAN SC xran forked repo")
This commit is contained in:
Teodora Vladić
2026-05-19 16:00:24 +02:00
parent 26b12e5aab
commit c87dd0cbcb

View File

@@ -8,11 +8,15 @@ add_library(oran_fhlib_5g_mplane MODULE
)
add_dependencies(oran_fhlib_5g_mplane oran_fhlib_5g)
if(xran_VERSION VERSION_GREATER_EQUAL 5 AND xran_VERSION VERSION_LESS 6)
message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION}")
elseif(xran_VERSION VERSION_EQUAL F_VERSION)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE)
elseif(xran_VERSION VERSION_EQUAL K_VERSION)
if(xran_FOUND)
if(xran_VERSION VERSION_GREATER_EQUAL 5 AND xran_VERSION VERSION_LESS 6)
message(FATAL_ERROR "xran E release not supported starting from tag 2026.w08.\nPlease switch to F version ${F_VERSION} or K version ${K_VERSION}")
elseif(xran_VERSION VERSION_EQUAL F_VERSION)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE)
elseif(xran_VERSION VERSION_EQUAL K_VERSION)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE K_RELEASE)
endif()
elseif(NOT xran_FOUND AND xran_DOWNLOAD)
target_compile_definitions(oran_fhlib_5g_mplane PRIVATE K_RELEASE)
endif()