vcpkg/ports/libuv/CMakeLists.txt

27 lines
821 B
CMake
Raw Normal View History

2017-05-16 23:16:43 +08:00
cmake_minimum_required(VERSION 3.5)
project(libuv C)
file(GLOB UV_SOURCES_COMMON src/*.c)
file(GLOB UV_SOURCES_WIN src/win/*.c)
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
2017-11-12 16:44:39 +08:00
target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
2017-05-16 23:16:43 +08:00
target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32)
target_include_directories(libuv PUBLIC ./include PRIVATE ./src)
set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED)
if(NOT UV_SKIP_HEADERS)
install(FILES
include/tree.h
include/uv.h
include/uv-version.h
include/uv-errno.h
include/uv-threadpool.h
include/uv-win.h
DESTINATION include)
endif()
install(TARGETS libuv
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)