CMakeLists.txt 967 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright (c) 2020 Actions Semiconductor Co., Ltd
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. if (CONFIG_SENSOR_MANAGER)
  5. set(ZEPHYR_CURRENT_LIBRARY acts_sensor)
  6. add_library(acts_sensor INTERFACE)
  7. zephyr_include_directories(
  8. .
  9. include
  10. )
  11. target_include_directories(acts_sensor INTERFACE
  12. include
  13. )
  14. zephyr_library()
  15. zephyr_library_sources_ifdef(
  16. CONFIG_SENSOR_MANAGER
  17. sensor_manager.c
  18. )
  19. zephyr_library_sources_ifdef(
  20. CONFIG_SENSOR_SERVICE
  21. sensor_service.c
  22. sensor_sleep.c
  23. sensor_port.c
  24. algo_port.c
  25. )
  26. zephyr_library_sources_ifdef(
  27. CONFIG_SENSOR_GPS_SERVICE
  28. gps_service.c
  29. )
  30. zephyr_library_sources_ifdef(
  31. CONFIG_GPS_MANAGER
  32. gps_manager.c
  33. )
  34. add_subdirectory_ifdef(CONFIG_SENSOR_GPS_SERVICE minmea)
  35. zephyr_library_link_libraries(acts_sensor)
  36. target_link_libraries(acts_sensor INTERFACE zephyr_interface)
  37. if(CONFIG_STACK_CANARIES)
  38. zephyr_library_compile_options(-DFRAMEWORK_SENSOR -fstack-protector-all)
  39. endif()
  40. endif()