stk-code_catmod/lib/enet/CMakeLists.txt
Deve d0f96a7673 Allow to cross-compile Windows build under Linux using MinGW.
It works fine on Ubuntu. You only need to use:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake
2015-01-08 21:46:59 +01:00

32 lines
565 B
CMake

# CMakeLists.txt - enet
include_directories("include")
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
endif()
add_definitions(-DHAS_SOCKLEN_T)
add_library(enet STATIC
callbacks.c
compress.c
host.c
list.c
packet.c
peer.c
protocol.c
unix.c
win32.c
)
if(MINGW)
target_link_libraries(enet wsock32 ws2_32 winmm)
endif()
#if(WIN32)
# find_library(WS2_LIBRARY NAMES "ws2_32" PATHS "C:/Windows/System32")
# target_link_libraries(enet ${WS2_LIBRARY})
#endif()