Skip to content

Commit c2acf69

Browse files
authored
support new include,lib dir structure in upcoming QNN 2.11 (#15605)
upcoming QNN 2.11 will have a different include/lib directory structure. update cmake files to support the new structure.
1 parent ccb2243 commit c2acf69

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmake/onnxruntime_providers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ if (onnxruntime_USE_QNN)
11011101
add_dependencies(onnxruntime_providers_qnn onnx ${onnxruntime_EXTERNAL_DEPENDENCIES})
11021102
set_target_properties(onnxruntime_providers_qnn PROPERTIES CXX_STANDARD_REQUIRED ON)
11031103
set_target_properties(onnxruntime_providers_qnn PROPERTIES FOLDER "ONNXRuntime")
1104-
target_include_directories(onnxruntime_providers_qnn PRIVATE ${ONNXRUNTIME_ROOT} ${onnxruntime_QNN_HOME}/include)
1104+
target_include_directories(onnxruntime_providers_qnn PRIVATE ${ONNXRUNTIME_ROOT} ${onnxruntime_QNN_HOME}/include/QNN ${onnxruntime_QNN_HOME}/include)
11051105
set_target_properties(onnxruntime_providers_qnn PROPERTIES LINKER_LANGUAGE CXX)
11061106
# ignore the warning unknown-pragmas on "pragma region"
11071107
if(NOT MSVC)

cmake/onnxruntime_unittests.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,9 +920,9 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
920920
endif()
921921

922922
if (MSVC OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
923-
file(GLOB QNN_LIB_FILES LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/target/${QNN_ARCH_ABI}/lib/*.so" "${onnxruntime_QNN_HOME}/target/${QNN_ARCH_ABI}/lib/*.dll")
923+
file(GLOB QNN_LIB_FILES LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/lib/${QNN_ARCH_ABI}/*.so" "${onnxruntime_QNN_HOME}/target/${QNN_ARCH_ABI}/lib/*.so" "${onnxruntime_QNN_HOME}/lib/${QNN_ARCH_ABI}/*.dll" "${onnxruntime_QNN_HOME}/target/${QNN_ARCH_ABI}/lib/*.dll")
924924
if (${QNN_ARCH_ABI} STREQUAL "aarch64-windows-msvc")
925-
file(GLOB EXTRA_HTP_LIB LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/target/hexagon-v68/lib/unsigned/libQnnHtpV68Skel.so")
925+
file(GLOB EXTRA_HTP_LIB LIST_DIRECTORIES false "${onnxruntime_QNN_HOME}/lib/hexagon-v68/unsigned/libQnnHtpV68Skel.so" "${onnxruntime_QNN_HOME}/target/hexagon-v68/lib/unsigned/libQnnHtpV68Skel.so")
926926
list(APPEND QNN_LIB_FILES ${EXTRA_HTP_LIB})
927927
endif()
928928
message(STATUS "QNN lib files: " ${QNN_LIB_FILES})

0 commit comments

Comments
 (0)