mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 21:37:50 +08:00
ddcc4ad334
* uwebsocket on linux need c++ support * [uwebsockets] Compile feature required on all platforms * [libuv] Install pthread-barrier.h
26 lines
713 B
CMake
26 lines
713 B
CMake
project(uwebsockets CXX)
|
|
|
|
option(INSTALL_HEADERS "Install header files" ON)
|
|
|
|
find_package(ZLIB REQUIRED)
|
|
find_package(OpenSSL REQUIRED)
|
|
find_path(LIBUV_INCLUDE_DIR uv.h)
|
|
find_library(LIBUV_LIBRARY NAMES libuv)
|
|
|
|
file(GLOB SOURCES src/*.cpp)
|
|
add_library(uWS ${SOURCES})
|
|
target_include_directories(uWS PUBLIC ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
|
|
target_link_libraries(uWS PUBLIC ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBUV_LIBRARY})
|
|
target_compile_features(uWS PRIVATE cxx_range_for)
|
|
|
|
install(TARGETS uWS
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
)
|
|
|
|
if(INSTALL_HEADERS)
|
|
file(GLOB HEADERS src/*.h)
|
|
install(FILES ${HEADERS} DESTINATION include/uWS)
|
|
endif()
|