Files @ r25924:31e3cdb1821b
Branch filter:

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

Patric Stout
Fix #9490: [Network] a full server couldn't be queried either (#9508)

You can now still query a full server, as long as the maximum
amount of allowed connections isn't reached. This means that as
long as there are not 255 clients connected to a server, you can
always connect to query.
# 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()