Skip to content

Commit a3d04f7

Browse files
committed
Update
[ghstack-poisoned]
1 parent df36289 commit a3d04f7

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tools/cmake/executorch-wheel-config.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,6 @@ if(EXISTS "${_executorch_version_file}")
177177
endif()
178178
unset(_executorch_version_file)
179179

180-
# Where the shipped libraries live. Computed here rather than beside the Python
181-
# extension, because a consumer on the older variables route is told to put this
182-
# in its INSTALL_RPATH, and a package built without that extension would
183-
# otherwise hand it an empty string and produce a binary that cannot start.
184-
if(_executorch_runtime_library)
185-
get_filename_component(
186-
EXECUTORCH_RUNTIME_LIBRARY_DIR "${_executorch_runtime_library}" DIRECTORY
187-
)
188-
endif()
189-
190180
set(EXECUTORCH_INCLUDE_DIRS "${_executorch_package_root}/include"
191181
"${_executorch_c10_include}"
192182
)
@@ -263,6 +253,16 @@ endfunction()
263253

264254
# The prebuilt runtime.
265255
_executorch_find_library(_executorch_runtime_library libexecutorch)
256+
257+
# Computed after the lookup above rather than beside the Python extension,
258+
# because a consumer on the older variables route is told to put this in its
259+
# INSTALL_RPATH, and reading it before the runtime library is found handed that
260+
# consumer an empty string.
261+
if(_executorch_runtime_library)
262+
get_filename_component(
263+
EXECUTORCH_RUNTIME_LIBRARY_DIR "${_executorch_runtime_library}" DIRECTORY
264+
)
265+
endif()
266266
if(_executorch_runtime_library AND NOT _executorch_targets_supported)
267267
# The imported targets are skipped, but the libraries themselves are present
268268
# and linkable by path, so the long-standing variables are still honoured.

0 commit comments

Comments
 (0)