Skip to content

append to CMAKE_FIND_ROOT_PATH instead of setting executorch_DIR #12618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9e3e2e7
Update
swolchok Jul 13, 2025
16f0274
forgot to amend
swolchok Jul 13, 2025
99ec5a7
Update
swolchok Jul 14, 2025
ff3cdb9
Update
swolchok Jul 14, 2025
513de13
Update
swolchok Jul 14, 2025
76db1f1
Update
swolchok Jul 14, 2025
08bffac
Update
swolchok Jul 14, 2025
dff96c8
Update
swolchok Jul 14, 2025
0e2bce6
Update
swolchok Jul 14, 2025
35d8319
Update
swolchok Jul 14, 2025
a31187e
Update
swolchok Jul 15, 2025
dcbce0d
Update
swolchok Jul 15, 2025
bc8f971
Update
swolchok Jul 15, 2025
29d3999
Update
swolchok Jul 15, 2025
7e4040a
Update
swolchok Jul 15, 2025
2dacf6f
Update
swolchok Jul 15, 2025
fb2b775
Update
swolchok Jul 15, 2025
02f19a6
Update
swolchok Jul 15, 2025
225d5a6
Update
swolchok Jul 15, 2025
41bf264
Update
swolchok Jul 16, 2025
f54a8ce
Update
swolchok Jul 16, 2025
e48e6cc
Update
swolchok Jul 16, 2025
a2f14ac
Update
swolchok Jul 16, 2025
c31a4b9
Update
swolchok Jul 17, 2025
4fd7372
Update
swolchok Jul 17, 2025
d650396
Update
swolchok Jul 17, 2025
3bfdade
Update
swolchok Jul 17, 2025
00acd77
Update
swolchok Jul 17, 2025
6946143
Update
swolchok Jul 17, 2025
431ddd8
Update
swolchok Jul 17, 2025
60456ca
Update
swolchok Jul 17, 2025
dcb3ca0
Update
swolchok Jul 18, 2025
3c30b31
Update
swolchok Jul 18, 2025
e9928a7
Update
swolchok Jul 18, 2025
b57678b
Update
swolchok Jul 18, 2025
05effc4
Update
swolchok Jul 18, 2025
f5bcdcc
Update
swolchok Jul 18, 2025
2e21d9a
Update
swolchok Jul 19, 2025
63e4a27
Update
swolchok Jul 19, 2025
4c2e046
rebase
swolchok Jul 19, 2025
0eb3d8d
rebase
swolchok Jul 19, 2025
a451cc3
rebase
swolchok Jul 19, 2025
ccd0e2d
Update
swolchok Jul 21, 2025
f9b96eb
Update
swolchok Jul 21, 2025
02d6d67
Update
swolchok Jul 21, 2025
995f6fa
Update
swolchok Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ endif()

if(EXECUTORCH_BUILD_TESTS)
include(CTest)
else()
# It looks like some of our third-party deps will try to turn this on if it's
# not explicitly set, leading to confusing behavior.
set(BUILD_TESTING OFF)
endif()

add_subdirectory(third-party)
Expand Down Expand Up @@ -737,7 +741,10 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
endif()

set(CMAKE_EXECUTABLE_SUFFIX ".html")
target_link_options(executor_runner PUBLIC -sALLOW_MEMORY_GROWTH --embed-file "${WASM_MODEL_DIR}@/")
target_link_options(
executor_runner PUBLIC -sALLOW_MEMORY_GROWTH --embed-file
"${WASM_MODEL_DIR}@/"
)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion examples/models/llama/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ find_package(gflags REQUIRED)
#

# find `executorch` libraries Same as for gflags
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/ExecuTorch)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/../../..)
find_package(executorch CONFIG REQUIRED)
target_link_options_shared_lib(executorch)

Expand Down
2 changes: 1 addition & 1 deletion examples/models/llava/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ find_package(gflags REQUIRED)
#

# find `executorch` libraries Same as for gflags
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/ExecuTorch)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/../../..)
find_package(executorch CONFIG REQUIRED)
target_link_options_shared_lib(executorch)

Expand Down
2 changes: 1 addition & 1 deletion examples/models/phi-3-mini/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(EXECUTORCH_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../..")
set(_common_include_directories
${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10
)
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/ExecuTorch)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/../../..)
find_package(executorch CONFIG REQUIRED)

target_link_options_shared_lib(executorch)
Expand Down
2 changes: 1 addition & 1 deletion extension/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ set_target_properties(fbjni PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/third-party/fbjni/prefab/modules/fbjni/libs/android.${ANDROID_ABI}/libfbjni.so"
)

set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../lib/cmake/ExecuTorch)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/../..)
target_link_options_shared_lib(executorch)

add_library(executorch_jni SHARED jni/jni_layer.cpp jni/log.cpp jni/jni_layer_runtime.cpp)
Expand Down
Loading