When asn1c is not found, allow to download and use asn1c in build tree

This simplifies dependancies management

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
Laurent THOMAS
2026-03-16 12:33:42 +01:00
committed by Robert Schmidt
parent 5fcd456a46
commit 3a935bc9f7
2 changed files with 29 additions and 14 deletions

View File

@@ -84,7 +84,7 @@ function(run_asn1c ASN1C_GRAMMAR ASN1C_PREFIX)
set(LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/${GRAMMAR_FILE}.log")
add_custom_command(OUTPUT ${ASN1C_OUTPUT}
COMMAND ASN1C_PREFIX=${ASN1C_PREFIX} ${ASN1C_EXEC} ${ASN1C_OPTIONS} -D ${CMAKE_CURRENT_BINARY_DIR} ${ASN1C_GRAMMAR} > ${LOGFILE} 2>&1 || ( cat ${LOGFILE} && false )
DEPENDS ${ASN1C_GRAMMAR}
DEPENDS ${ASN1C_GRAMMAR} asn1c
COMMENT "Generating ${ASN1C_COMMENT} from ${GRAMMAR_FILE}"
)
endfunction()