mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 09:19:07 +08:00
c76ec6f7f7
* [tensorpipe] create a new port * [tensorpipe] create patch for libuv * [libnop] create a new port * [libnop] update baseline and port SHA * [tensorpipe] fix header/target install * [tensorpipe] remove support of Windows/UWP * [tensorpipe] update baseline and port SHA * Update ports/tensorpipe/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/tensorpipe/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * [tensorpipe] support 'test' feature for Linux * it will be helpful to check output binaries are valid * update code snapshot(2021/03/02) and port SHA * [tensorpipe] fix build failures in Linux * TC for 'ibv' failes * link with CMAKE_DL_LIBS for <dlfcn.h> * [tensorpipe] apply PR feedback * [tensorpipe] update version-date and patches * [tensorpipe] FATAL_ERROR if feature requires Linux * [tensorpipe] reduce features and code base * simplify features * fix `pybind11` build failures * updates source code base and CMake export file names * use GNUInstallDirs variable * [tensorpipe] update baseline * [tensorpipe] update support * use more correct "support" exporession * [tensorpipe] fix Linux/CUDA test options * [tensorpipe] fix corrupted patch * [tensorpipe] fix wrong support expression Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
72 lines
2.5 KiB
Diff
72 lines
2.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 640054e..18de9ea 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -23,6 +23,6 @@ include(MiscCheck)
|
|
|
|
add_subdirectory(tensorpipe)
|
|
|
|
-install(EXPORT TensorpipeTargets
|
|
- DESTINATION share/cmake/Tensorpipe
|
|
- FILE TensorpipeTargets.cmake)
|
|
+install(EXPORT tensorpipeTargets
|
|
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME} # share/tensorpipe
|
|
+ FILE tensorpipeTargets.cmake)
|
|
diff --git a/tensorpipe/CMakeLists.txt b/tensorpipe/CMakeLists.txt
|
|
index d8624b4..dce5c6f 100644
|
|
--- a/tensorpipe/CMakeLists.txt
|
|
+++ b/tensorpipe/CMakeLists.txt
|
|
@@ -168,8 +168,9 @@ set(TP_PUBLIC_HEADERS ${TP_PUBLIC_HEADERS}
|
|
transport/uv/error.h
|
|
transport/uv/factory.h
|
|
transport/uv/utility.h)
|
|
-find_package(uv REQUIRED)
|
|
-target_link_libraries(tensorpipe PRIVATE uv::uv)
|
|
+# `libuv` in vcpkg
|
|
+find_package(unofficial-libuv CONFIG REQUIRED)
|
|
+target_link_libraries(tensorpipe PUBLIC unofficial::libuv::libuv ${CMAKE_DL_LIBS})
|
|
|
|
### shm
|
|
|
|
@@ -233,11 +234,14 @@ configure_file(config.h.in config.h)
|
|
|
|
## Libnop
|
|
|
|
-# We should keep libnop headers private as they should not be exposed to downstream users,
|
|
-# but they're currently transitively included by tensorpipe/transport/connection.h (which
|
|
-# is still unclear whether it should be a public or private header).
|
|
-target_include_directories(tensorpipe PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party/libnop/include>)
|
|
-
|
|
+# `libnop` in vcpkg
|
|
+find_path(LIBNOP_INCLUDE_DIRS "nop/serializer.h")
|
|
+if(LIBNOP_INCLUDE_DIRS-NOTFOUND)
|
|
+ message(FATAL_ERROR "Failed to find header of the 'libnop' package from vcpkg.")
|
|
+else()
|
|
+ message(STATUS "Using 'libnop': ${LIBNOP_INCLUDE_DIRS}")
|
|
+endif()
|
|
+target_include_directories(tensorpipe PUBLIC $<BUILD_INTERFACE:${LIBNOP_INCLUDE_DIRS}>)
|
|
|
|
## Python bindings
|
|
|
|
@@ -262,10 +266,17 @@ endif()
|
|
|
|
## Install
|
|
|
|
+install(DIRECTORY channel common core transport util
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tensorpipe
|
|
+ FILES_MATCHING PATTERN "*.h")
|
|
+install(FILES tensorpipe.h
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tensorpipe)
|
|
+
|
|
install(TARGETS tensorpipe
|
|
- EXPORT TensorpipeTargets
|
|
- LIBRARY DESTINATION ${TP_INSTALL_LIBDIR}
|
|
- ARCHIVE DESTINATION ${TP_INSTALL_LIBDIR})
|
|
+ EXPORT tensorpipeTargets
|
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
foreach(_header_file ${TP_PUBLIC_HEADERS})
|
|
get_filename_component(_TP_HEADER_SUBDIR "${_header_file}" DIRECTORY)
|