CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright (C) 2020 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
  2. # All rights reserved.
  3. #
  4. set(target ql_app_bt)
  5. add_library(${target} STATIC)
  6. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  7. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  8. target_include_directories(${target} PUBLIC inc)
  9. #target_link_libraries(${target} PRIVATE ql_api_common)
  10. target_sources(${target} PRIVATE
  11. bt_demo.c
  12. )
  13. relative_glob(srcs include/*.h src/*.c inc/*.h)
  14. beautify_c_code(${target} ${srcs})
  15. if(QL_APP_FEATURE_BT_SPP)
  16. set(target ql_app_bt_spp)
  17. add_library(${target} STATIC)
  18. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  19. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  20. target_include_directories(${target} PUBLIC inc)
  21. target_link_libraries(${target} PRIVATE ql_app_bt)
  22. target_sources(${target} PRIVATE
  23. bt_spp_demo.c
  24. )
  25. relative_glob(srcs include/*.h src/*.c inc/*.h)
  26. beautify_c_code(${target} ${srcs})
  27. endif()
  28. if(QL_APP_FEATURE_BT_HFP)
  29. set(target ql_app_bt_hfp)
  30. add_library(${target} STATIC)
  31. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  32. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  33. target_include_directories(${target} PUBLIC inc)
  34. target_link_libraries(${target} PRIVATE ql_app_bt)
  35. target_sources(${target} PRIVATE
  36. bt_hfp_demo.c
  37. )
  38. relative_glob(srcs include/*.h src/*.c inc/*.h)
  39. beautify_c_code(${target} ${srcs})
  40. endif()
  41. if(QL_APP_FEATURE_BT_A2DP_AVRCP)
  42. set(target ql_app_bt_a2dp_avrcp)
  43. add_library(${target} STATIC)
  44. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  45. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  46. target_include_directories(${target} PUBLIC inc)
  47. target_link_libraries(${target} PRIVATE ql_app_bt)
  48. target_sources(${target} PRIVATE
  49. bt_a2dp_avrcp_demo.c
  50. )
  51. relative_glob(srcs include/*.h src/*.c inc/*.h)
  52. beautify_c_code(${target} ${srcs})
  53. endif()
  54. if(QL_APP_FEATURE_BLE_GATT)
  55. set(target ql_app_ble_gatt)
  56. add_library(${target} STATIC)
  57. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  58. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  59. target_include_directories(${target} PUBLIC inc)
  60. target_link_libraries(${target} PRIVATE ql_app_bt)
  61. target_sources(${target} PRIVATE
  62. ble_gatt_demo.c
  63. )
  64. relative_glob(srcs include/*.h src/*.c inc/*.h)
  65. beautify_c_code(${target} ${srcs})
  66. endif()