CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright (C) 2021 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
  2. # All rights reserved.
  3. #
  4. configure_file(../inc/quec_proj_config_at.h.in ${out_inc_dir}/quec_proj_config_at.h)
  5. set(target ql_at_cmd_table_gperf)
  6. set(gperf_in src/ql_at_cmd_table.gperf)
  7. set(gperf_h ${CMAKE_CURRENT_BINARY_DIR}/ql_at_cmd_table.h)
  8. cpp_only(${target} ${gperf_in})
  9. add_custom_command(OUTPUT ${gperf_h}
  10. COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/src/gperf2h.py
  11. $<TARGET_OBJECTS:ql_at_cmd_table_gperf> ${gperf_h}
  12. DEPENDS $<TARGET_OBJECTS:ql_at_cmd_table_gperf>
  13. ${CMAKE_CURRENT_SOURCE_DIR}/src/gperf2h.py
  14. )
  15. set(target ql_open_at)
  16. add_app_libraries($<TARGET_FILE:${target}>)
  17. add_library(${target} STATIC)
  18. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  19. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  20. target_include_directories(${target} PUBLIC inc)
  21. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
  22. target_link_libraries(${target} PRIVATE kernel driver hal fs fsmount audio ml ats atr)
  23. if(CONFIG_QUEC_PROJECT_FEATURE_TEESDK_VTRUST_AT)
  24. target_include_targets(${target} PRIVATE vtrust)
  25. target_link_libraries(${target} PRIVATE vtrust)
  26. endif()
  27. target_sources(${target} PRIVATE
  28. ${gperf_h}
  29. src/ql_atcmd_handler.c
  30. )
  31. relative_glob(srcs include/*.h src/*.c inc/*.h)
  32. beautify_c_code(${target} ${srcs})