Files @ r27813:6b3a5970aa1b
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/Static.cmake

Patric Stout
Add: use breakpad to create crash.dmp on MacOS / Linux too (#11202)

Normally only the Windows platform could create a crash.dmp, making
analysing crash-reports from MacOS / Linux rather tricky.
# Set static linking if the platform requires it.
#
# set_static()
#
function(set_static_if_needed)
     if(MINGW)
        # Let exectutables run outside MinGW environment
        # Force searching static libs
        set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)

        # Force static linking
        link_libraries(-static -static-libgcc -static-libstdc++)
    endif()
endfunction()