@@ -36,6 +36,11 @@ include(${EXECUTORCH_SRCS_FILE})
36
36
37
37
# build llama_runner library
38
38
list (TRANSFORM _llama_runner__srcs PREPEND "${EXECUTORCH_ROOT} /" )
39
+ if (WIN32 )
40
+ set_property (TARGET extension_module PROPERTY
41
+ IMPORTED_IMPLIB "${EXECUTORCH_ROOT} /cmake-out/lib/extension_module.lib" )
42
+
43
+ endif ()
39
44
40
45
target_include_directories (
41
46
extension_module INTERFACE ${_common_include_directories}
@@ -52,7 +57,7 @@ list(APPEND _llama_runner__srcs
52
57
if (CMAKE_TOOLCHAIN_IOS
53
58
OR ANDROID
54
59
OR APPLE
55
- OR WIN32
60
+ OR WIN32
56
61
)
57
62
# Building a share library on iOS requires code signing On Android we see
58
63
# duplicated registration when using shared lib
@@ -76,24 +81,13 @@ add_subdirectory(
76
81
)
77
82
set (CMAKE_POSITION_INDEPENDENT_CODE ${_pic_flag} )
78
83
79
- if (WIN32 )
80
- # in Windows, only extension_module_static works and has duplicated symbols with extension_tensor
81
- set (llama_runner_deps executorch extension_data_loader extension_module_static
82
- re2::re2
83
- )
84
- # in Windows, need PUBLIC or sources files in executorch/examples/models/llama/runner/ cannot be found
85
- target_include_directories (
86
- llama_runner PUBLIC ${_common_include_directories} ${EXECUTORCH_ROOT}
87
- )
88
- else ()
89
84
set (llama_runner_deps executorch extension_data_loader extension_module
90
85
extension_tensor re2::re2
91
86
)
92
- target_include_directories (
93
- llama_runner INTERFACE ${_common_include_directories} ${EXECUTORCH_ROOT}
94
- )
95
- endif ()
96
87
97
88
target_link_libraries (llama_runner PUBLIC ${llama_runner_deps} )
98
89
99
- target_compile_options (llama_runner PUBLIC ${_preprocessor_flag} )
90
+ target_include_directories (
91
+ llama_runner INTERFACE ${_common_include_directories} ${EXECUTORCH_ROOT}
92
+ )
93
+ target_compile_options (llama_runner PUBLIC ${_preprocessor_flag} )
0 commit comments