--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,7 +78,7 @@
 
 set(SYMBOLSUFFIX "" CACHE STRING  "Add a suffix to all exported symbol names in the shared library, e.g. _64 for INTERFACE64 builds" )
 
-if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS AND NOT ("${SYMBOLPREFIX}${SYMBOLSUFFIX}" STREQUAL ""))
+if (MSVC AND BUILD_SHARED_LIBS AND NOT ("${SYMBOLPREFIX}${SYMBOLSUFFIX}" STREQUAL ""))
 set (DELETE_STATIC_LIBS "")
 if (NOT BUILD_STATIC_LIBS)
 	message (STATUS "forcing build of a temporary static library for symbol renaming")
@@ -513,7 +513,7 @@
 	  set (BZ 0)
   endif()
 
-  if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+  if (MSVC)
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
 if (CMAKE_BUILD_TYPE MATCHES "Debug")
