mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
15 lines
392 B
CMake
15 lines
392 B
CMake
# 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()
|