提交 d2c37fe4 编写于 作者: M Megvii Engine Team

feat(megbrain): add mc20 cmake

GitOrigin-RevId: 4d64e803fbd8e45bf7b56a41ee818b8d576bea4d
上级 b8f810ee
find_path(MC20_ROOT_DIR
include/ax_interpreter_external_api.h
PATHS
${PROJECT_SOURCE_DIR}/third_party/mc20/
$ENV{MC20DIR}
)
if(${MC20_ROOT_DIR} STREQUAL "MC20_ROOT_DIR-NOTFOUND")
message(FATAL_ERROR "Can not find MC20")
endif()
message(STATUS "Build with MC20 in ${MC20_ROOT_DIR}")
find_path(MC20_INCLUDE_DIR
ax_interpreter_external_api.h
PATHS
${MC20_ROOT_DIR}/include
${INCLUDE_INSTALL_DIR}
)
add_library(libmc20 INTERFACE IMPORTED)
find_library(MC20_LIBRARY
NAMES libax_interpreter_external.x86.a
PATHS ${MC20_ROOT_DIR}/lib/)
if(${MC20_LIBRARY} STREQUAL "MC20_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Can not find MC20 library")
endif()
target_link_libraries(libmc20 INTERFACE ${MC20_LIBRARY})
target_include_directories(libmc20 INTERFACE ${MC20_INCLUDE_DIR})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册