aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2023-07-19 19:29:55 -0400
committerarcady-lunarg <122813703+arcady-lunarg@users.noreply.github.com>2023-07-19 20:02:03 -0600
commit77417d5c9e0a5d4c79ddd0285d530b45f7259f0d (patch)
tree5d01635774b341c02e898287c6de014565faa888
parent865fe739581a39cccadb21737fbbf1e6ee16d7fe (diff)
downloadglslang-77417d5c9e0a5d4c79ddd0285d530b45f7259f0d.tar.gz
Support MinGW build with Clang, not just GCC
Fixes: #3270
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05219ab2..72f5f881 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,7 +204,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
function(glslang_set_link_args TARGET)
# For MinGW compiles, statically link against the GCC and C++ runtimes.
# This avoids the need to ship those runtimes as DLLs.
- if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+ # This is supported by GCC and Clang.
+ if(WIN32 AND NOT MSVC)
set_target_properties(${TARGET} PROPERTIES
LINK_FLAGS "-static -static-libgcc -static-libstdc++")
endif()