diff options
| author | Christophe Guébert <c.guebert@e-media.fr> | 2016-12-06 16:39:57 +0100 |
|---|---|---|
| committer | Christophe Guébert <c.guebert@e-media.fr> | 2016-12-06 16:42:26 +0100 |
| commit | 7a061e8d90818b9058ff9b31376445c9dac2cfd9 (patch) | |
| tree | 4343274edb73927cfd45d09ca65d63d3bba83715 /ports/uwebsockets/0001_cmake.patch | |
| parent | af9d82ceb34f51187ce3456b740f7c75350a139c (diff) | |
| download | vcpkg-7a061e8d90818b9058ff9b31376445c9dac2cfd9.tar.gz vcpkg-7a061e8d90818b9058ff9b31376445c9dac2cfd9.zip | |
Add uWebSockets.
Diffstat (limited to 'ports/uwebsockets/0001_cmake.patch')
| -rw-r--r-- | ports/uwebsockets/0001_cmake.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ports/uwebsockets/0001_cmake.patch b/ports/uwebsockets/0001_cmake.patch new file mode 100644 index 000000000..f4004a5bb --- /dev/null +++ b/ports/uwebsockets/0001_cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fadf72..6ee984d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,11 @@ if(NOT LIBUV_INCLUDE_DIR) + find_path(LIBUV_INCLUDE_DIR uv.h) + endif() + if(NOT LIBUV_LIBRARY) +- find_library(LIBUV_LIBRARY NAMES uv uv1) ++ if(WIN32) ++ find_library(LIBUV_LIBRARY NAMES libuv) ++ else() ++ find_library(LIBUV_LIBRARY NAMES uv uv1) ++ endif() + endif() + + add_library(uWS src/Extensions.cpp src/Group.cpp src/WebSocketImpl.cpp src/Networking.cpp src/Hub.cpp src/Node.cpp src/WebSocket.cpp src/HTTPSocket.cpp src/Socket.cpp) +@@ -38,4 +42,20 @@ install (TARGETS uWS DESTINATION /usr/lib64) + install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION /usr/include/uWS) + endif (UNIX) + +-add_subdirectory(examples) ++#add_subdirectory(examples) ++ ++if(WIN32) ++ target_link_libraries (uWS PUBLIC psapi.lib iphlpapi.lib userenv.lib) ++ install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION include/uWS) ++ ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries (uWS PUBLIC ws2_32.lib) ++ endif() ++endif() ++ ++install( ++ TARGETS uWS ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file
\ No newline at end of file |
