This commit is contained in:
2026-04-21 02:24:47 +08:00
parent 11d87f16a5
commit 80f4327e79
2 changed files with 13 additions and 1 deletions

View File

@@ -613,6 +613,13 @@ set(DOOMGENERIC_APP_SOURCES)
foreach(_base IN LISTS DOOMGENERIC_SRC_BASENAMES) foreach(_base IN LISTS DOOMGENERIC_SRC_BASENAMES)
list(APPEND DOOMGENERIC_APP_SOURCES "cleonos/third-party/doomgeneric/doomgeneric/${_base}.c") list(APPEND DOOMGENERIC_APP_SOURCES "cleonos/third-party/doomgeneric/doomgeneric/${_base}.c")
endforeach() endforeach()
set(DOOMGENERIC_REQUIRED_SOURCE "${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric/dummy.c")
if(EXISTS "${DOOMGENERIC_REQUIRED_SOURCE}")
set(DOOMGENERIC_AVAILABLE ON)
else()
set(DOOMGENERIC_AVAILABLE OFF)
cl_log_warn("doomgeneric sources missing, doom app will be skipped: ${DOOMGENERIC_REQUIRED_SOURCE}")
endif()
file(GLOB_RECURSE DOOMGENERIC_DEP_SOURCES_ABS CONFIGURE_DEPENDS file(GLOB_RECURSE DOOMGENERIC_DEP_SOURCES_ABS CONFIGURE_DEPENDS
"${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric/*.h" "${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric/*.h"
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/doom/*.h" "${CMAKE_SOURCE_DIR}/cleonos/c/apps/doom/*.h"
@@ -651,6 +658,11 @@ foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
continue() continue()
endif() endif()
if(_app_name STREQUAL "doom" AND NOT DOOMGENERIC_AVAILABLE)
cl_log_warn("skip user app doom because doomgeneric sources are unavailable")
continue()
endif()
list(FIND USER_APP_NAMES "${_app_name}" _dup_name_idx) list(FIND USER_APP_NAMES "${_app_name}" _dup_name_idx)
if(NOT _dup_name_idx EQUAL -1) if(NOT _dup_name_idx EQUAL -1)
cl_log_error("duplicate user app name: ${_app_name}") cl_log_error("duplicate user app name: ${_app_name}")