Magical pixie dust for windows updater reliability

Don't ask.
This commit is contained in:
Petr Mrázek
2013-12-17 00:37:56 +01:00
parent be8dba9ee2
commit f8067a6034
5 changed files with 105 additions and 15 deletions

View File

@ -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.