cmake: default VBAM_STATIC=ON for MinGW/MSYS2

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-04-19 04:07:30 +03:00
parent b28982a89a
commit 1bd2f049cb
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,11 @@ option(ENABLE_WX "Build the wxWidgets port" ON)
option(ENABLE_DEBUGGER "Enable the debugger" ON)
option(ENABLE_ASAN "Enable -fsanitize=<option>, address by default, requires debug build" OFF)
# Default to static builds on MinGW and all MSYS2 envs.
if(MINGW OR (NOT "$ENV{MSYSTEM_PREFIX}" STREQUAL ""))
set(VBAM_STATIC_DEFAULT ON)
endif()
option(VBAM_STATIC "Try to link all libraries statically" ${VBAM_STATIC_DEFAULT})
if(VBAM_STATIC)