mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-12 18:39:32 +08:00
add -static to deps build when building for MinGW, in case one if them is linking with something dynamically
This commit is contained in:
parent
1932c06fe5
commit
2646921695
@ -226,6 +226,15 @@ local function cmake_build(dep_folder, is_32, extra_cmd_defs, c_flags_init, cxx_
|
|||||||
table.insert(all_cflags_init, '-m32')
|
table.insert(all_cflags_init, '-m32')
|
||||||
table.insert(all_cxxflags_init, '-m32')
|
table.insert(all_cxxflags_init, '-m32')
|
||||||
end
|
end
|
||||||
|
if os.target() == 'windows' then -- MinGW on Windows
|
||||||
|
table.insert(all_cflags_init, '-static')
|
||||||
|
table.insert(all_cxxflags_init, '-static')
|
||||||
|
-- from docs: "specifies that the typical Microsoft Windows predefined macros are to be set in the pre-processor,
|
||||||
|
-- but does not influence the choice of runtime library/startup code"
|
||||||
|
-- optional really
|
||||||
|
table.insert(all_cflags_init, '-mwin32')
|
||||||
|
table.insert(all_cxxflags_init, '-mwin32')
|
||||||
|
end
|
||||||
elseif string.match(_ACTION, 'vs.+') then
|
elseif string.match(_ACTION, 'vs.+') then
|
||||||
-- these 2 are needed because mbedtls doesn't care about 'CMAKE_MSVC_RUNTIME_LIBRARY' for some reason
|
-- these 2 are needed because mbedtls doesn't care about 'CMAKE_MSVC_RUNTIME_LIBRARY' for some reason
|
||||||
table.insert(all_cflags_init, '-MT')
|
table.insert(all_cflags_init, '-MT')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user