1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
--- a/c10/CMakeLists.txt
+++ b/c10/CMakeLists.txt
@@ -157,7 +157,7 @@ if(NOT BUILD_LIBTORCHLESS)
# Note: for now, we will put all export path into one single Caffe2Targets group
# to deal with the cmake deployment need. Inside the Caffe2Targets set, the
# individual libraries like libc10.so and libcaffe2.so are still self-contained.
- install(TARGETS c10 EXPORT Caffe2Targets DESTINATION lib)
+ install(TARGETS c10 EXPORT Caffe2Targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
--- a/c10/cuda/CMakeLists.txt
+++ b/c10/cuda/CMakeLists.txt
@@ -82,7 +82,7 @@ if(NOT BUILD_LIBTORCHLESS)
# Note: for now, we will put all export path into one single Caffe2Targets group
# to deal with the cmake deployment need. Inside the Caffe2Targets set, the
# individual libraries like libc10.so and libcaffe2.so are still self-contained.
-install(TARGETS c10_cuda EXPORT Caffe2Targets DESTINATION lib)
+install(TARGETS c10_cuda EXPORT Caffe2Targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
--- a/c10/hip/CMakeLists.txt
+++ b/c10/hip/CMakeLists.txt
@@ -57,7 +57,7 @@ if(NOT BUILD_LIBTORCHLESS)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>)
- install(TARGETS c10_hip EXPORT Caffe2Targets DESTINATION lib)
+ install(TARGETS c10_hip EXPORT Caffe2Targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(C10_HIP_LIB c10_hip)
endif()
--- a/c10/xpu/CMakeLists.txt
+++ b/c10/xpu/CMakeLists.txt
@@ -45,7 +45,7 @@ target_include_directories(
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
)
- install(TARGETS c10_xpu EXPORT Caffe2Targets DESTINATION lib)
+ install(TARGETS c10_xpu EXPORT Caffe2Targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(C10_XPU_LIB c10_xpu)
add_subdirectory(test)
endif()
--- a/test/cpp/c10d/CMakeLists.txt
+++ b/test/cpp/c10d/CMakeLists.txt
@@ -64,7 +64,7 @@ if(USE_CUDA)
torch_cpu c10d_cuda_test gtest_main __caffe2_ucc)
if(INSTALL_TEST)
install(TARGETS ProcessGroupUCCTest DESTINATION bin)
- install(TARGETS c10d_cuda_test DESTINATION lib)
+ install(TARGETS c10d_cuda_test DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
else()
--- a/test/cpp/jit/CMakeLists.txt
+++ b/test/cpp/jit/CMakeLists.txt
@@ -32,9 +32,9 @@ endif()
target_link_libraries(backend_with_compiler torch)
if(INSTALL_TEST)
- install(TARGETS torchbind_test DESTINATION lib)
- install(TARGETS jitbackend_test DESTINATION lib)
- install(TARGETS backend_with_compiler DESTINATION lib)
+ install(TARGETS torchbind_test DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS jitbackend_test DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS backend_with_compiler DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
# Build the cpp gtest binary containing the cpp-only tests.
|