From 06cafa3040b93bea2665fd0bebe2112ab4ea431c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 1 Aug 2025 01:59:15 +0200 Subject: [PATCH] cmake: explicitly disable UNITY_BUILD property for SDL3 libraries --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0de10a1d90..40066abd56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,6 +448,7 @@ if(SDL_SHARED) add_library(SDL3-shared SHARED) add_library(SDL3::SDL3-shared ALIAS SDL3-shared) SDL_AddCommonCompilerFlags(SDL3-shared) + set_property(TARGET SDL3-shared PROPERTY UNITY_BUILD OFF) if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES) target_compile_features(SDL3-shared PRIVATE c_std_99) else() @@ -459,6 +460,7 @@ if(SDL_STATIC) add_library(SDL3-static STATIC) add_library(SDL3::SDL3-static ALIAS SDL3-static) SDL_AddCommonCompilerFlags(SDL3-static) + set_property(TARGET SDL3-static PROPERTY UNITY_BUILD OFF) if ("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES) target_compile_features(SDL3-static PRIVATE c_std_99) else() @@ -1228,6 +1230,7 @@ target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/src") target_include_directories(SDL_uclibc PRIVATE "${SDL3_SOURCE_DIR}/include") SDL_AddCommonCompilerFlags(SDL_uclibc) sdl_sources(STATIC "$") +set_property(TARGET SDL_uclibc PROPERTY UNITY_BUILD OFF) if(TARGET SDL3-shared) target_link_libraries(SDL3-shared PRIVATE SDL_uclibc) endif()