Skip to content

Commit 351d82f

Browse files
authored
Sweep major CMake files for use of include/lib instead of CMAKE_INSTALL_INCLUDE/LIBDIR (#12792)
Supposed to use the latter. (This is the thing that causes binaries to show up in lib64 for some weird builds, for example.)
1 parent e09abea commit 351d82f

File tree

26 files changed

+42
-38
lines changed

26 files changed

+42
-38
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ if(EXECUTORCH_BUILD_CPUINFO)
226226
install(
227227
TARGETS cpuinfo
228228
EXPORT ExecuTorchTargets
229-
DESTINATION lib
229+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
230230
INCLUDES
231231
DESTINATION ${_common_include_directories}
232232
)
@@ -269,7 +269,7 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
269269
install(
270270
TARGETS pthreadpool pthreadpool_interface fxdiv
271271
EXPORT ExecuTorchTargets
272-
DESTINATION lib
272+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
273273
INCLUDES
274274
DESTINATION ${_common_include_directories}
275275
)
@@ -708,7 +708,7 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
708708
install(
709709
TARGETS torchao_ops_executorch torchao_kernels_aarch64
710710
EXPORT ExecuTorchTargets
711-
DESTINATION lib
711+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
712712
INCLUDES
713713
DESTINATION ${_common_include_directories}
714714
)
@@ -719,7 +719,7 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
719719
install(
720720
TARGETS kleidiai
721721
EXPORT ExecuTorchTargets
722-
DESTINATION lib
722+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
723723
INCLUDES
724724
DESTINATION ${_common_include_directories}
725725
)
@@ -999,7 +999,7 @@ if(NOT EXECUTORCH_SELECT_OPS_YAML STREQUAL ""
999999
install(
10001000
TARGETS executorch_selected_kernels
10011001
EXPORT ExecuTorchTargets
1002-
DESTINATION lib
1002+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
10031003
)
10041004
else()
10051005
# No selective build - link the full library.

backends/aoti/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ executorch_target_link_options_shared_lib(aoti_common)
5050
install(
5151
TARGETS aoti_common
5252
EXPORT ExecuTorchTargets
53-
DESTINATION lib
53+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
5454
)

backends/apple/coreml/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if(APPLE)
115115
endif()
116116
target_compile_options(coreml_util PUBLIC -fPIC)
117117

118-
install(TARGETS coreml_util DESTINATION lib)
118+
install(TARGETS coreml_util DESTINATION ${CMAKE_INSTALL_LIBDIR})
119119

120120
install(
121121
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/runtime/util
@@ -154,7 +154,7 @@ target_compile_options(coreml_inmemoryfs PUBLIC -fPIC)
154154

155155
install(
156156
TARGETS coreml_inmemoryfs
157-
DESTINATION lib
157+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
158158
INCLUDES
159159
DESTINATION ${_common_include_directories}
160160
)
@@ -251,7 +251,7 @@ if(APPLE)
251251
install(
252252
TARGETS coremldelegate coreml_util coreml_inmemoryfs
253253
EXPORT ExecuTorchTargets
254-
DESTINATION lib
254+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
255255
INCLUDES
256256
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
257257
)

backends/apple/mps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ target_compile_options(mpsdelegate PRIVATE "-fno-objc-arc")
7777
install(
7878
TARGETS mpsdelegate mps_schema
7979
EXPORT ExecuTorchTargets
80-
DESTINATION lib
80+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
8181
INCLUDES
8282
DESTINATION ${_common_include_directories}
8383
)

backends/cortex_m/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ gen_operators_lib(
9090
install(
9191
TARGETS cortex_m_kernels cortex_m_ops_lib cmsis-nn
9292
EXPORT ExecuTorchTargets
93-
DESTINATION lib
94-
PUBLIC_HEADER DESTINATION include/executorch/backends/cortex_m/ops/
93+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
94+
PUBLIC_HEADER
95+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/executorch/backends/cortex_m/ops/
9596
)

backends/mediatek/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ executorch_target_link_options_shared_lib(neuron_backend)
4646
install(
4747
TARGETS neuron_backend
4848
EXPORT ExecuTorchTargets
49-
DESTINATION lib
49+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
5050
)

backends/nxp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ target_include_directories(
1717
install(
1818
TARGETS executorch_delegate_neutron
1919
EXPORT ExecuTorchTargets
20-
DESTINATION lib
20+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
2121
)

backends/openvino/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ endif()
8181
install(
8282
TARGETS openvino_backend
8383
EXPORT ExecuTorchTargets
84-
DESTINATION lib
84+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
8585
INCLUDES
8686
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
8787
)

backends/qualcomm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ add_subdirectory(
214214
install(
215215
TARGETS qnn_executorch_backend
216216
EXPORT ExecuTorchTargets
217-
DESTINATION lib
217+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
218218
)
219219

220220
# QNN pybind

backends/samsung/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if(${ANDROID})
161161
install(
162162
TARGETS enn_backend enn_logging
163163
EXPORT ExecuTorchTargets
164-
DESTINATION lib
164+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
165165
)
166166
endif()
167167

0 commit comments

Comments
 (0)