From f8067a60346207d4b9b9f0c0eb5b1c3a70e28485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 17 Dec 2013 00:37:56 +0100 Subject: Magical pixie dust for windows updater reliability Don't ask. --- mmc_updater/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mmc_updater/CMakeLists.txt') diff --git a/mmc_updater/CMakeLists.txt b/mmc_updater/CMakeLists.txt index 61c8cd09..971ac153 100644 --- a/mmc_updater/CMakeLists.txt +++ b/mmc_updater/CMakeLists.txt @@ -9,6 +9,14 @@ include_directories(depends) if (WIN32) include_directories(depends/win32cpp) + # static all the things. The updater must have no dependencies, or it will fail. + if (MINGW) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++ -static") +#set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc -s") +#set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++ -s") + endif() + if(MSVC) # - Link the updater binary statically with the Visual C++ runtime # so that the executable can function standalone. -- cgit v1.2.3