You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mc20.cmake 814 B

1234567891011121314151617181920212223242526272829
  1. find_path(MC20_ROOT_DIR
  2. include/ax_interpreter_external_api.h
  3. PATHS
  4. ${PROJECT_SOURCE_DIR}/third_party/mc20/
  5. $ENV{MC20DIR}
  6. )
  7. if(${MC20_ROOT_DIR} STREQUAL "MC20_ROOT_DIR-NOTFOUND")
  8. message(FATAL_ERROR "Can not find MC20")
  9. endif()
  10. message(STATUS "Build with MC20 in ${MC20_ROOT_DIR}")
  11. find_path(MC20_INCLUDE_DIR
  12. ax_interpreter_external_api.h
  13. PATHS
  14. ${MC20_ROOT_DIR}/include
  15. ${INCLUDE_INSTALL_DIR}
  16. )
  17. add_library(libmc20 INTERFACE IMPORTED)
  18. find_library(MC20_LIBRARY
  19. NAMES libax_interpreter_external.x86.a
  20. PATHS ${MC20_ROOT_DIR}/lib/)
  21. if(${MC20_LIBRARY} STREQUAL "MC20_LIBRARY-NOTFOUND")
  22. message(FATAL_ERROR "Can not find MC20 library")
  23. endif()
  24. target_link_libraries(libmc20 INTERFACE ${MC20_LIBRARY})
  25. target_include_directories(libmc20 INTERFACE ${MC20_INCLUDE_DIR})