Skip to content
Snippets Groups Projects
Commit 1f66341d authored by Logan Aerl Arias's avatar Logan Aerl Arias
Browse files

fix issue with static mingw build on Windows

parent 620bb505
No related branches found
No related tags found
2 merge requests!2642Fix building pt2,!2640fix issue with static mingw build on Windows
...@@ -464,8 +464,13 @@ else() ...@@ -464,8 +464,13 @@ else()
endif() endif()
if(TARGET miniupnpc::miniupnpc) if(TARGET miniupnpc::miniupnpc)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC) if("${VCPKG_TARGET_TRIPLET}" MATCHES "-mingw-static$")
target_link_libraries(SRB2SDL2 PRIVATE miniupnpc::miniupnpc) 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") message(STATUS "miniupnpc Found")
else() else()
message(STATUS "No miniupnpc Found") message(STATUS "No miniupnpc Found")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment