From 2f62978e4c324985be6df66972d657491811596d Mon Sep 17 00:00:00 2001 From: Maximilien Date: Mon, 11 Dec 2023 11:39:12 +0900 Subject: [PATCH] Changed the level 0 materials custom commands so that materials for all APIs are built. This allows to turn off the OpenGL backend (using -DFILAMENT_SUPPORTS_OPENGL=OFF). Previously, disabling the OpenGL backend was leading to a compilation error related to missing level 0 materials. --- filament/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filament/CMakeLists.txt b/filament/CMakeLists.txt index f9bba52968f..578c4594a31 100644 --- a/filament/CMakeLists.txt +++ b/filament/CMakeLists.txt @@ -320,7 +320,7 @@ foreach (mat_src ${MATERIAL_SRCS}) list(APPEND MATERIAL_BINS ${output_path}) endforeach() -if (FILAMENT_ENABLE_FEATURE_LEVEL_0 AND FILAMENT_SUPPORTS_OPENGL) +if (FILAMENT_ENABLE_FEATURE_LEVEL_0) foreach (mat_src ${MATERIAL_FL0_SRCS}) get_filename_component(localname "${mat_src}" NAME_WE) get_filename_component(fullname "${mat_src}" ABSOLUTE) @@ -328,7 +328,7 @@ if (FILAMENT_ENABLE_FEATURE_LEVEL_0 AND FILAMENT_SUPPORTS_OPENGL) add_custom_command( OUTPUT ${output_path} - COMMAND matc -a opengl -p ${MATC_TARGET} ${MATC_OPT_FLAGS} -o ${output_path} ${fullname} + COMMAND matc ${MATC_BASE_FLAGS} -o ${output_path} ${fullname} MAIN_DEPENDENCY ${fullname} DEPENDS matc COMMENT "Compiling material ${mat_src} to ${output_path}"