mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 10:19:01 +08:00
25 lines
662 B
CMake
25 lines
662 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})
|
|
|
|
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()
|