Skip to content

Commit c6391a7

Browse files
mikes-lunargcharles-lunarg
authored andcommitted
Fix MSVC identification for modules support
Can't use `MSVC` var because it is also true for clang-cl. Fixes #500.
1 parent fbda054 commit c6391a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ add_library(Vulkan-Headers INTERFACE)
4242
add_library(Vulkan::Headers ALIAS Vulkan-Headers)
4343
target_include_directories(Vulkan-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
4444

45-
if (MSVC AND (MSVC_VERSION GREATER_EQUAL "1941") OR
45+
if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND (MSVC_VERSION GREATER_EQUAL "1941")) OR
4646
# clang-cl doesn't currently support modules
4747
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
4848
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0"

0 commit comments

Comments
 (0)