From b02a2cd2c05108664795e412c252101752b3222a Mon Sep 17 00:00:00 2001 From: emiyl Date: Tue, 21 Apr 2026 01:02:19 +0100 Subject: [PATCH] move cmake compile definitions to appropriate place --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e5f8ad7..adc78b44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,13 +115,6 @@ option(ENABLE_VULKAN "Enables the Vulkan backend" ON) option(ENABLE_METAL "Enables the Metal backend" ${ENABLE_METAL_DEFAULT}) option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON) -if (ENABLE_OPENGL) - add_compile_definitions(ENABLE_OPENGL) -endif() -if (ENABLE_VULKAN) - add_compile_definitions(ENABLE_VULKAN) -endif() - if (ENABLE_METAL AND NOT APPLE) message(FATAL_ERROR "Metal backend is only supported on Apple platforms") endif() @@ -192,10 +185,12 @@ endif() if (ENABLE_VULKAN) include_directories("dependencies/Vulkan-Headers/include") + add_compile_definitions(ENABLE_VULKAN) endif() if (ENABLE_OPENGL) find_package(OpenGL REQUIRED) + add_compile_definitions(ENABLE_OPENGL) endif() if (ENABLE_METAL)