Support clang compiler on Windows when using CMake

This commit is contained in:
Maarten Bent 2018-08-16 20:12:44 +02:00
parent 8d72f3c5f4
commit ceda6f6815

View File

@ -51,10 +51,12 @@ set(wxARCH_SUFFIX)
# TODO: include compiler version in wxCOMPILER_PREFIX ?
if(WIN32)
if(MSVC)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(wxCOMPILER_PREFIX "vc")
elseif(CMAKE_COMPILER_IS_GNUCXX)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(wxCOMPILER_PREFIX "gcc")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(wxCOMPILER_PREFIX "clang")
else()
message(FATAL_ERROR "Unknown WIN32 compiler type")
endif()