From 8b2bfa7e9d94e32ff4c2780fd7562e44a876e070 Mon Sep 17 00:00:00 2001 From: imadr Date: Mon, 1 Dec 2025 18:22:38 -0800 Subject: [PATCH] Fix build on windows when vulkan is not supported (#9439) Co-authored-by: Sungun Park --- libs/filamentapp/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/filamentapp/CMakeLists.txt b/libs/filamentapp/CMakeLists.txt index d6892e8fdd..cb1ad31b82 100644 --- a/libs/filamentapp/CMakeLists.txt +++ b/libs/filamentapp/CMakeLists.txt @@ -37,9 +37,12 @@ set(SRCS src/IcoSphere.cpp src/MeshAssimp.cpp src/Sphere.cpp - src/VulkanPlatformHelper.cpp ) +if (FILAMENT_SUPPORTS_VULKAN) + list(APPEND SRCS src/VulkanPlatformHelper.cpp) +endif() + set(LIBS assimp camutils @@ -79,7 +82,11 @@ endif() if (WIN32) list(APPEND SRCS src/NativeWindowHelperWindows.cpp) - list(APPEND SRCS src/VulkanPlatformHelperWindows.cpp) + + if (FILAMENT_SUPPORTS_VULKAN) + list(APPEND SRCS src/VulkanPlatformHelperWindows.cpp) + endif() + list(APPEND LIBS sdl2main) endif()