Skip to content

Commit bf72079

Browse files
committed
Sweep major CMake files for use of include/lib instead of CMAKE_INSTALL_INCLUDE/LIBDIR
Supposed to use the latter. (This is the thing that causes binaries to show up in lib64 for some weird builds, for example.) ghstack-source-id: 2d56aec ghstack-comment-id: 3111516638 Pull-Request: #12792
1 parent e30255a commit bf72079

File tree

21 files changed

+33
-33
lines changed

21 files changed

+33
-33
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ if(EXECUTORCH_BUILD_CPUINFO)
224224
install(
225225
TARGETS cpuinfo
226226
EXPORT ExecuTorchTargets
227-
DESTINATION lib
227+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
228228
INCLUDES
229229
DESTINATION ${_common_include_directories}
230230
)
@@ -267,7 +267,7 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
267267
install(
268268
TARGETS pthreadpool pthreadpool_interface fxdiv
269269
EXPORT ExecuTorchTargets
270-
DESTINATION lib
270+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
271271
INCLUDES
272272
DESTINATION ${_common_include_directories}
273273
)

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ gen_operators_lib(
5252

5353
install(
5454
TARGETS cortex_m_kernels cortex_m_ops_lib
55-
DESTINATION lib
56-
PUBLIC_HEADER DESTINATION include/executorch/backends/cortex_m/ops/
55+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
56+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/executorch/backends/cortex_m/ops/
5757
)

backends/mediatek/CMakeLists.txt

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

backends/openvino/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ executorch_target_link_options_shared_lib(openvino_backend)
5151
if(EXECUTORCH_BUILD_OPENVINO_EXECUTOR_RUNNER)
5252
# Build executor runner binary for openvino backend
5353
list(APPEND openvino_executor_runner_libs openvino_backend executorch)
54-
54+
5555
set(_openvino_executor_runner__srcs
5656
${EXECUTORCH_ROOT}/examples/portable/executor_runner/executor_runner.cpp
5757
${EXECUTORCH_ROOT}/extension/data_loader/file_data_loader.cpp
@@ -60,9 +60,9 @@ if(EXECUTORCH_BUILD_OPENVINO_EXECUTOR_RUNNER)
6060
${EXECUTORCH_ROOT}/extension/runner_util/inputs_portable.cpp
6161
)
6262
add_executable(openvino_executor_runner ${_openvino_executor_runner__srcs})
63-
63+
6464
list(APPEND openvino_executor_runner_libs)
65-
65+
6666
target_link_libraries(
6767
openvino_executor_runner gflags portable_ops_lib ${openvino_executor_runner_libs}
6868
)
@@ -72,4 +72,4 @@ endif()
7272

7373

7474
# Install OpenVINO backend library to the lib directory
75-
install(TARGETS openvino_backend DESTINATION lib)
75+
install(TARGETS openvino_backend DESTINATION ${CMAKE_INSTALL_LIBDIR})

backends/qualcomm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ add_subdirectory(
232232
install(
233233
TARGETS qnn_executorch_backend
234234
EXPORT ExecuTorchTargets
235-
DESTINATION lib
235+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
236236
)
237237

238238
# QNN pybind

backends/vulkan/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ endif()
140140
install(
141141
TARGETS vulkan_backend vulkan_schema
142142
EXPORT ExecuTorchTargets
143-
DESTINATION lib
143+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
144144
INCLUDES
145145
DESTINATION ${COMMON_INCLUDES}
146146
)

configurations/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
6363
install(
6464
TARGETS optimized_native_cpu_ops_lib
6565
EXPORT ExecuTorchTargets
66-
DESTINATION lib
66+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
6767
)
6868
endif()

extension/data_loader/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ target_compile_options(extension_data_loader PUBLIC ${_common_compile_options})
3636
install(
3737
TARGETS extension_data_loader
3838
EXPORT ExecuTorchTargets
39-
DESTINATION lib
39+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
4040
INCLUDES
4141
DESTINATION ${_common_include_directories}
4242
)

0 commit comments

Comments
 (0)