You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
393 B
CMake
15 lines
393 B
CMake
6 years ago
|
# 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()
|