From ea6db7d8159c53575ff4b37f42d47d11e81f46b0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 5 Jun 2016 16:23:01 -0400 Subject: [PATCH] Statically linked MinGW-w64 libraries in those executable builds. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c081290..f303be4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 2.8.11) # - uname -s for more refined OS control # - Haiku for haiku # - debian DESTDIR? https://github.com/andlabs/libui/pull/10 -# - static libgcc in MinGW builds # the docs say we need to set this up prior to project() set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8") @@ -105,6 +104,15 @@ else() set(_COMMON_LDFLAGS -fvisibility=hidden ) + + # don't require shipping the MinGW-w64 DLLs + if(WIN32) + list(APPEND _COMMON_LDFLAGS + -static + -static-libgcc + -static-libstdc++ + ) + endif() endif() # problem: