From c05129df527a0538aedda8b77cacde45446fc29f Mon Sep 17 00:00:00 2001 From: Kasper Isager Date: Fri, 5 Apr 2024 11:48:09 +0200 Subject: [PATCH] Link to static STL on Windows --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93f4356..00c1d81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,14 @@ if(NOT TARGET c++) PROPERTIES IMPORTED_LOCATION ${c++} ) + + if(target MATCHES "win32") + target_link_options( + c++ + INTERFACE + /DEFAULTLIB:libcpmt$<$:d> + ) + endif() endif() if(NOT TARGET v8)