Skip to content
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

Make cmake export libxaie path to air #554

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 2 additions & 10 deletions cmake/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ set(AIE_CONFIG_INCLUDE_DIRS
set(AIE_CONFIG_EXPORTS_FILE "\${AIE_CMAKE_DIR}/AIETargets.cmake")
set(AIE_CONFIG_LibXAIE_x86_64_DIR)
if ("x86_64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_x86_64_DIR "${PROJECT_BINARY_DIR}/runtime_lib/x86_64/xaiengine")
set(AIE_CONFIG_LibXAIE_x86_64_DIR "${LibXAIE_x86_64_DIR}")
endif()
set(AIE_CONFIG_LibXAIE_aarch64_DIR)
if ("aarch64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_aarch64_DIR "${PROJECT_BINARY_DIR}/runtime_lib/aarch64/xaiengine")
set(AIE_CONFIG_LibXAIE_aarch64_DIR "${LibXAIE_aarch64_DIR}")
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/AIEConfig.cmake.in
Expand Down Expand Up @@ -62,14 +62,6 @@ set(AIE_CONFIG_INCLUDE_DIRS
"\${AIE_INSTALL_PREFIX}/include"
)
set(AIE_CONFIG_EXPORTS_FILE "\${AIE_CMAKE_DIR}/AIETargets.cmake")
set(AIE_CONFIG_LibXAIE_x86_64_DIR)
if ("x86_64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_x86_64_DIR "\${AIE_INSTALL_PREFIX}/runtime_lib/x86_64/xaiengine")
endif()
set(AIE_CONFIG_LibXAIE_aarch64_DIR)
if ("aarch64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_aarch64_DIR "\${AIE_INSTALL_PREFIX}/runtime_lib/aarch64/xaiengine")
endif()

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/AIEConfig.cmake.in
Expand Down
5 changes: 5 additions & 0 deletions runtime_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,9 @@ foreach(target ${AIE_RUNTIME_TARGETS})
TEST_EXCLUDE_FROM_MAIN true
)
endif()

# Export newly built libxaie
if (NOT DEFINED LibXAIE_${target}_DIR)
set(LibXAIE_${target}_DIR ${CMAKE_CURRENT_BINARY_DIR}/${target}/xaiengine PARENT_SCOPE)
endif()
endforeach()
Loading