diff --git a/cmake/libaec-config.cmake.in b/cmake/libaec-config.cmake.in
index 6f6c9e9ea8d860abd96b027273459cbd631daf1d..ce5d4cce75f17d335df0877ba8bfa913a4fe914f 100644
--- a/cmake/libaec-config.cmake.in
+++ b/cmake/libaec-config.cmake.in
@@ -60,7 +60,7 @@ if (libaec_FOUND)
   else ()
     add_library(libaec::aec SHARED IMPORTED)
     target_compile_definitions(libaec::aec INTERFACE LIBAEC_SHARED)
-    if (MSVC)
+    if (WIN32)
       set_target_properties(libaec::aec PROPERTIES
         IMPORTED_IMPLIB "${libaec_LIBRARY}"
       )
@@ -77,7 +77,7 @@ if (libaec_FOUND)
   else ()
     add_library(libaec::sz SHARED IMPORTED)
     target_compile_definitions(libaec::sz INTERFACE LIBAEC_SHARED)
-    if (MSVC)
+    if (WIN32)
       set_target_properties(libaec::sz PROPERTIES
         IMPORTED_IMPLIB "${SZIP_LIBRARY}"
       )