You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
654 B
18 lines
654 B
cmake_minimum_required(VERSION 3.24)
|
|
# set(CMAKE_C_STANDARD 11)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
uSockets_content
|
|
GIT_REPOSITORY https://github.com/uNetworking/uSockets
|
|
GIT_TAG v0.8.5
|
|
GIT_SHALLOW ON
|
|
GIT_SUBMODULES ""
|
|
)
|
|
FetchContent_MakeAvailable(uSockets_content)
|
|
file(GLOB_RECURSE SOURCES ${usockets_content_SOURCE_DIR}/src/*.c)
|
|
add_library(uSockets ${SOURCES})
|
|
target_include_directories(uSockets PUBLIC ${usockets_content_SOURCE_DIR}/src)
|
|
target_compile_definitions(uSockets PRIVATE LIBUS_NO_SSL)
|
|
|
|
find_package(libuv CONFIG REQUIRED)
|
|
target_link_libraries(uSockets PRIVATE $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>) |