Files @ r28098:2f7e0d913c81
Branch filter:

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

Peter Nelson
Add: Mock sprite cache intialization.

This fills up the sprite cache with SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT zero-size sprites, to
allow GetSpriteSize() calls to continue from unit-tests.
# 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()