Browse Source

Merge pull request #3759 from H27CK/opus-mingw-w64

Set _FORTIFY_SOURCE=0 if building Opus with mingw-w64
Mat M 6 năm trước cách đây
mục cha
commit
6ce3d174b7
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      externals/opus/CMakeLists.txt

+ 5 - 1
externals/opus/CMakeLists.txt

@@ -203,7 +203,11 @@ endif()
 target_compile_definitions(opus PRIVATE OPUS_BUILD ENABLE_HARDENING)
 
 if(NOT MSVC)
-    target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=2)
+    if(MINGW)
+        target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=0)
+    else()
+        target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=2)
+    endif()
 endif()
 
 # It is strongly recommended to uncomment one of these VAR_ARRAYS: Use C99