cmake_minimum_required(VERSION 3.21...3.24) if (NOT UE_IREE_BUILD_ROOT) message(FATAL_ERROR "Error: UE_IREE_BUILD_ROOT not set") endif() if (NOT UE_IREE_ADDITIONAL_SOURCES) set(UE_IREE_ADDITIONAL_SOURCES "") endif() # Set device standalone to make sure some functions are included to avoid mismatch on target systems (e.g. __truncsfhf2 and __extendhfsf2) add_compile_definitions(IREE_DEVICE_STANDALONE) add_subdirectory("${UE_IREE_BUILD_ROOT}/iree" "iree" EXCLUDE_FROM_ALL) # Get all targets required by the runtime set(_RUNTIME_ROOT "iree::runtime") set(_RUNTIME_OBJECTS "$>>") set(_RUNTIME_LIBS "$>>") set(_LOADER_ROOT "iree::hal::local::loaders::static_library_loader") set(_LOADER_OBJECTS "$>>") set(_LOADER_LIBS "$>>") set(_ELF_ROOT "iree::hal::local::elf::arch") set(_ELF_OBJECTS "$>>") set(_ELF_LIBS "$>>") set(_DEVICE_ROOT "iree::builtins::device::device") set(_DEVICE_OBJECTS "$>>") set(_DEVICE_LIBS "$>>") # Define the library add_library(ireert ${_RUNTIME_OBJECTS} ${_LOADER_OBJECTS} ${_ELF_OBJECTS} ${_DEVICE_OBJECTS} ${UE_IREE_ADDITIONAL_SOURCES}) target_link_libraries(ireert PUBLIC ${_RUNTIME_LIBS} ${_LOADER_LIBS} ${_ELF_LIBS} ${_DEVICE_LIBS})