1*5f2f4271Schristoscmake_minimum_required(VERSION 3.5) 2*5f2f4271Schristos 3*5f2f4271Schristosproject(libuv_sample) 4*5f2f4271Schristos 5*5f2f4271Schristosset(CMAKE_EXPORT_COMPILE_COMMANDS ON) 6*5f2f4271Schristos 7*5f2f4271Schristosadd_subdirectory("../../" build) 8*5f2f4271Schristos 9*5f2f4271Schristosset(SIMPLE_SAMPLES 10*5f2f4271Schristos cgi 11*5f2f4271Schristos helloworld 12*5f2f4271Schristos dns 13*5f2f4271Schristos detach 14*5f2f4271Schristos default-loop 15*5f2f4271Schristos idle-basic 16*5f2f4271Schristos idle-compute 17*5f2f4271Schristos interfaces 18*5f2f4271Schristos locks 19*5f2f4271Schristos onchange 20*5f2f4271Schristos pipe-echo-server 21*5f2f4271Schristos ref-timer 22*5f2f4271Schristos spawn 23*5f2f4271Schristos tcp-echo-server 24*5f2f4271Schristos thread-create 25*5f2f4271Schristos udp-dhcp 26*5f2f4271Schristos uvcat 27*5f2f4271Schristos uvstop 28*5f2f4271Schristos uvtee 29*5f2f4271Schristos ) 30*5f2f4271SchristosIF (NOT WIN32) 31*5f2f4271Schristos list(APPEND SIMPLE_SAMPLES 32*5f2f4271Schristos signal 33*5f2f4271Schristos progress 34*5f2f4271Schristos queue-cancel 35*5f2f4271Schristos queue-work 36*5f2f4271Schristos tty 37*5f2f4271Schristos tty-gravity 38*5f2f4271Schristos ) 39*5f2f4271SchristosENDIF() 40*5f2f4271Schristos 41*5f2f4271Schristosforeach (X IN LISTS SIMPLE_SAMPLES) 42*5f2f4271Schristos add_executable(${X} ${X}/main.c) 43*5f2f4271Schristos target_link_libraries(${X} uv_a) 44*5f2f4271Schristosendforeach () 45*5f2f4271Schristos 46*5f2f4271Schristos 47*5f2f4271SchristosFIND_PACKAGE(CURL) 48*5f2f4271SchristosIF(CURL_FOUND) 49*5f2f4271Schristos add_executable(uvwget uvwget/main.c) 50*5f2f4271Schristos target_link_libraries(uvwget uv_a ${CURL_LIBRARIES}) 51*5f2f4271SchristosENDIF(CURL_FOUND) 52