mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-19 16:51:53 +00:00
fix issue with static mingw build on Windows
This commit is contained in:
parent
620bb5054f
commit
1f66341d59
1 changed files with 7 additions and 2 deletions
|
@ -464,8 +464,13 @@ else()
|
|||
endif()
|
||||
|
||||
if(TARGET miniupnpc::miniupnpc)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc)
|
||||
if("${VCPKG_TARGET_TRIPLET}" MATCHES "-mingw-static$")
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC -DMINIUPNP_STATICLIB)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc -liphlpapi)
|
||||
else()
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc)
|
||||
endif()
|
||||
message(STATUS "miniupnpc Found")
|
||||
else()
|
||||
message(STATUS "No miniupnpc Found")
|
||||
|
|
Loading…
Reference in a new issue