Skip to content
Snippets Groups Projects
Commit 0cfb8688 authored by Bert Belder's avatar Bert Belder
Browse files

cmake: Update for libuv.

parent b2ed24d8
No related branches found
No related merge requests found
cmake_minimum_required(VERSION 2.6)
project(uv)
string(TOLOWER ${CMAKE_SYSTEM_NAME} uv_platform)
set(uv_platform_source ${uv_SOURCE_DIR}/src/uv-${uv_platform}.c)
set(uv_source
src/uv-common.c
src/uv-eio.c
src/uv-unix.c)
if(EXISTS ${uv_platform_source})
set(uv_source ${uv_source} ${uv_platform_source})
else()
message(FATAL_ERROR "Unsupported platform: ${uv_platform}")
endif()
include_directories(
include
src/ares/config_${uv_platform})
add_subdirectory(src/ev)
add_subdirectory(src/eio)
add_subdirectory(src/ares)
add_library(uv ${uv_source})
target_link_libraries(uv
ev
eio
ares)
cmake_minimum_required(VERSION 2.6)
include(FindThreads)
project(eio)
add_definitions(-D_GNU_SOURCE)
if(!${CMAKE_USE_PTHREADS_INIT})
message(FATAL_ERROR "Unable to find pthreads")
endif()
string(TOLOWER ${CMAKE_SYSTEM_NAME} eio_platform)
set(config_header ${ev_SOURCE_DIR}/config_${eio_platform}.h)
if(EXISTS ${config_header})
add_definitions(-DEIO_CONFIG_H="${config_header}")
else()
message(FATAL_ERROR "Unsupported platform: ${eio_platform}")
endif()
add_library(eio eio.c)
target_link_libraries(eio ${CMAKE_THREAD_LIBS_INIT})
cmake_minimum_required(VERSION 2.6)
project(ev)
add_definitions(-DEV_MULTIPLICITY=0)
string(TOLOWER ${CMAKE_SYSTEM_NAME} ev_platform)
set(config_header ${ev_SOURCE_DIR}/config_${ev_platform}.h)
if(EXISTS ${config_header})
add_definitions(-DEV_CONFIG_H="${config_header}")
else()
message(FATAL_ERROR "Unsupported platform: ${ev_platform}")
endif()
add_library (ev ev.c)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment