forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request conan-io#1729 from yipdw/feature/libuv-1.38.0
Add libuv/1.38.0
- Loading branch information
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0496d36a..90615d57 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -298,13 +298,17 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") | ||
list(APPEND uv_test_libraries util) | ||
endif() | ||
|
||
-add_library(uv SHARED ${uv_sources}) | ||
-target_compile_definitions(uv | ||
- INTERFACE | ||
- USING_UV_SHARED=1 | ||
- PRIVATE | ||
- BUILDING_UV_SHARED=1 | ||
- ${uv_defines}) | ||
+add_library(uv ${uv_sources}) | ||
+get_target_property(target_type uv TYPE) | ||
+if (target_type STREQUAL "SHARED_LIBRARY") | ||
+ target_compile_definitions(uv | ||
+ INTERFACE | ||
+ USING_UV_SHARED=1 | ||
+ PRIVATE | ||
+ BUILDING_UV_SHARED=1 | ||
+ ) | ||
+endif() | ||
+target_compile_definitions(uv PRIVATE ${uv_defines}) | ||
target_compile_options(uv PRIVATE ${uv_cflags}) | ||
target_include_directories(uv | ||
PUBLIC | ||
@@ -314,17 +318,6 @@ target_include_directories(uv | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>) | ||
target_link_libraries(uv ${uv_libraries}) | ||
|
||
-add_library(uv_a STATIC ${uv_sources}) | ||
-target_compile_definitions(uv_a PRIVATE ${uv_defines}) | ||
-target_compile_options(uv_a PRIVATE ${uv_cflags}) | ||
-target_include_directories(uv_a | ||
- PUBLIC | ||
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
- PRIVATE | ||
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>) | ||
-target_link_libraries(uv_a ${uv_libraries}) | ||
- | ||
if(LIBUV_BUILD_TESTS) | ||
# Small hack: use ${uv_test_sources} now to get the runner skeleton, | ||
# before the actual tests are added. | ||
@@ -558,22 +551,20 @@ if(UNIX) | ||
set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) | ||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) | ||
set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
- configure_file(libuv.pc.in libuv.pc @ONLY) | ||
|
||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) | ||
- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) | ||
+ install(TARGETS uv | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
endif() | ||
|
||
if(WIN32) | ||
install(DIRECTORY include/ DESTINATION include) | ||
- install(FILES LICENSE DESTINATION .) | ||
- install(TARGETS uv uv_a | ||
- RUNTIME DESTINATION lib/$<CONFIG> | ||
- ARCHIVE DESTINATION lib/$<CONFIG>) | ||
+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) | ||
+ install(TARGETS uv | ||
+ RUNTIME DESTINATION bin | ||
+ ARCHIVE DESTINATION lib) | ||
endif() | ||
|
||
message(STATUS "summary of build options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
versions: | ||
"1.34.2": | ||
folder: all | ||
"1.38.0": | ||
folder: all |