1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Merge pull request #165 from Battlerax/battlerax-dev

[Build] Fix for MSVC linking issue with RakNet while maintaining MSYS2 compatibility
This commit is contained in:
David Cernat 2017-02-23 02:23:27 +02:00 committed by GitHub
commit 4b497a18c6

View file

@ -54,14 +54,22 @@ IF(RakNet_FOUND)
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
SET(RakNet_LIBRARY optimized ${RakNet_LIBRARY_RELEASE} debug ${RakNet_LIBRARY_DEBUG}) SET(RakNet_LIBRARY optimized ${RakNet_LIBRARY_RELEASE} debug ${RakNet_LIBRARY_DEBUG})
IF(WIN32) IF(WIN32)
IF(MSVC)
SET(RakNet_LIBRARY optimized ${RakNet_LIBRARY_RELEASE} debug ${RakNet_LIBRARY_DEBUG} ws2_32.lib)
ELSE()
SET(RakNet_LIBRARY optimized ${RakNet_LIBRARY_RELEASE} debug ${RakNet_LIBRARY_DEBUG} -lws2_32) SET(RakNet_LIBRARY optimized ${RakNet_LIBRARY_RELEASE} debug ${RakNet_LIBRARY_DEBUG} -lws2_32)
ENDIF(MSVC)
ENDIF(WIN32) ENDIF(WIN32)
ELSE() ELSE()
# if there are no configuration types and CMAKE_BUILD_TYPE has no value # if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries # then just use the release libraries
SET(RakNet_LIBRARY ${RakNet_LIBRARY_RELEASE} ) SET(RakNet_LIBRARY ${RakNet_LIBRARY_RELEASE} )
IF(WIN32) IF(WIN32)
if(MSVC)
SET(RakNet_LIBRARY ${RakNet_LIBRARY_RELEASE} ws2_32.lib)
ELSE()
SET(RakNet_LIBRARY ${RakNet_LIBRARY_RELEASE} -lws2_32) SET(RakNet_LIBRARY ${RakNet_LIBRARY_RELEASE} -lws2_32)
ENDIF(MSVC)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF() ENDIF()