2019-04-02 02:40:20 +08:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
project(uvw)
|
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
find_package(libuv CONFIG REQUIRED)
|
2019-04-02 02:40:20 +08:00
|
|
|
|
|
|
|
add_library(uvw INTERFACE)
|
2022-07-09 04:02:45 +08:00
|
|
|
if (TARGET uv)
|
|
|
|
target_link_libraries(uvw INTERFACE uv)
|
|
|
|
else()
|
|
|
|
target_link_libraries(uvw INTERFACE uv_a)
|
|
|
|
endif()
|
2019-04-02 02:40:20 +08:00
|
|
|
|
|
|
|
install(TARGETS uvw
|
|
|
|
EXPORT uvw
|
|
|
|
INCLUDES DESTINATION include/)
|
|
|
|
|
|
|
|
install(EXPORT uvw
|
|
|
|
DESTINATION "share/uvw"
|
|
|
|
FILE uvw-targets.cmake
|
|
|
|
NAMESPACE uvw::)
|
|
|
|
|
|
|
|
install(DIRECTORY
|
|
|
|
src/uvw/
|
|
|
|
DESTINATION include/uvw/)
|
|
|
|
|
|
|
|
install(FILES
|
|
|
|
src/uvw.hpp
|
|
|
|
DESTINATION include/
|
|
|
|
)
|