diff --git a/CMakeLists.txt b/CMakeLists.txt index 0248745d..db662a20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ if(SPDLOG_BUILD_SHARED) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -if(MSVC) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # place dlls and libs and executables in the same directory set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$)