Ver Fonte

cmake: disable precompiled header for SDL_spinlock.c when targeting Android

This fixes the following error:
error: PCH file was compiled for the target 'thumbv7-none-linux-android16' but the current translation unit is being compiled for target 'armv7-none-linux-android16'
Anonymous Maarten há 2 anos atrás
pai
commit
19d4d64cfe
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -1211,6 +1211,7 @@ if(ANDROID)
   cmake_pop_check_state()
   cmake_pop_check_state()
   if(HAVE_ARM_MODE)
   if(HAVE_ARM_MODE)
     set_property(SOURCE "${SDL3_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
     set_property(SOURCE "${SDL3_SOURCE_DIR}/src/atomic/SDL_spinlock.c" APPEND_STRING PROPERTY COMPILE_FLAGS " -marm")
+    set_source_files_properties(src/atomic/SDL_spinlock.c PROPERTIES SKIP_PRECOMPILE_HEADERS 1)
   endif()
   endif()
 
 
   if(SDL_AUDIO)
   if(SDL_AUDIO)