From a65e172752387afdc9af6c2d5b9e7420f7bd8276 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 25 Sep 2024 12:19:42 -0700 Subject: [PATCH] Test MSVC instead of NOT MINGW The condition also needs to exclude Clang on Windows. Fix https://github.com/AOMediaCodec/libavif/issues/2442. --- CMakeLists.txt | 6 +++--- tests/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 101edcb3b2..0b98f21600 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -727,7 +727,7 @@ if(AVIF_BUILD_APPS) # output: # CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, # name:1, language:0x0409 - if(NOT MINGW) + if(MSVC) target_link_options(avifenc PRIVATE /MANIFEST:NO) endif() endif() @@ -738,7 +738,7 @@ if(AVIF_BUILD_APPS) add_executable(avifdec apps/avifdec.c) if(WIN32) target_sources(avifdec PRIVATE apps/utf8.rc) - if(NOT MINGW) + if(MSVC) target_link_options(avifdec PRIVATE /MANIFEST:NO) endif() endif() @@ -774,7 +774,7 @@ if(AVIF_BUILD_APPS) add_executable(avifgainmaputil "${AVIFGAINMAPUTIL_SRCS}") if(WIN32) target_sources(avifgainmaputil PRIVATE apps/utf8.rc) - if(NOT MINGW) + if(MSVC) target_link_options(avifgainmaputil PRIVATE /MANIFEST:NO) endif() endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 732eeaeafa..baa09f3da4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -240,7 +240,7 @@ if(AVIF_BUILD_APPS) add_executable(are_images_equal gtest/are_images_equal.cc) if(WIN32) target_sources(are_images_equal PRIVATE ${CMAKE_SOURCE_DIR}/apps/utf8.rc) - if(NOT MINGW) + if(MSVC) target_link_options(are_images_equal PRIVATE /MANIFEST:NO) endif() endif()