diff --git a/3rdparty/libwebp/CMakeLists.txt b/3rdparty/libwebp/CMakeLists.txt index 1787466f8d..13593526cd 100644 --- a/3rdparty/libwebp/CMakeLists.txt +++ b/3rdparty/libwebp/CMakeLists.txt @@ -24,7 +24,11 @@ endif() if(WIN32) foreach(file ${lib_srcs}) if("${file}" MATCHES "_avx2.c") - set_source_files_properties("${file}" COMPILE_FLAGS "/arch:AVX") + if(MSVC) + set_source_files_properties("${file}" COMPILE_FLAGS "/arch:AVX") + else() + set_source_files_properties("${file}" COMPILE_FLAGS "-mavx") + endif() endif() endforeach() endif()