comparison third_party/libuv/docs/code/CMakeLists.txt @ 160:948de3f54cea

[ThirdParty] Added libuv
author June Park <parkjune1995@gmail.com>
date Wed, 14 Jan 2026 19:39:52 -0800
parents
children
comparison
equal deleted inserted replaced
159:05cf9467a1c3 160:948de3f54cea
1 cmake_minimum_required(VERSION 3.5)
2
3 project(libuv_sample)
4
5 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6
7 add_subdirectory("../../" build)
8
9 set(SIMPLE_SAMPLES
10 cgi
11 helloworld
12 dns
13 detach
14 default-loop
15 idle-basic
16 idle-compute
17 interfaces
18 locks
19 onchange
20 pipe-echo-server
21 ref-timer
22 spawn
23 tcp-echo-server
24 thread-create
25 udp-dhcp
26 uvcat
27 uvstop
28 uvtee
29 )
30 IF (NOT WIN32)
31 list(APPEND SIMPLE_SAMPLES
32 signal
33 progress
34 queue-cancel
35 queue-work
36 tty
37 tty-gravity
38 )
39 ENDIF()
40
41 foreach (X IN LISTS SIMPLE_SAMPLES)
42 add_executable(${X} ${X}/main.c)
43 target_link_libraries(${X} uv_a)
44 endforeach ()
45
46
47 FIND_PACKAGE(CURL)
48 IF(CURL_FOUND)
49 add_executable(uvwget uvwget/main.c)
50 target_link_libraries(uvwget uv_a ${CURL_LIBRARIES})
51 ENDIF(CURL_FOUND)