Browse Source

Tests: link with `-static` on MinGW

Benoit Blanchon 3 years ago
parent
commit
986f77fa15
1 changed files with 6 additions and 0 deletions
  1. 6 0
      extras/CompileOptions.cmake

+ 6 - 0
extras/CompileOptions.cmake

@@ -92,3 +92,9 @@ if(MSVC)
 		)
 	endif()
 endif()
+
+if(MINGW)
+  # Static link on MinGW to avoid linking with the wrong DLLs when multiple
+	# versions are installed.
+	add_link_options(-static)
+endif()