CMakeLists.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # RDA assumes no responsibility or liability for the use of the software,
  6. # conveys no license or title under any patent, copyright, or mask work
  7. # right to the product. RDA reserves the right to make changes in the
  8. # software without notification. RDA also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. configure_file(include/fupdate_config.h.in ${out_inc_dir}/fupdate_config.h)
  12. set(target fupdate_security_app)
  13. add_app_libraries($<TARGET_FILE:${target}>)
  14. if(CONFIG_SOC_8910)
  15. add_library(${target} STATIC
  16. src/fupdate_security_pack.c
  17. src/8910/fupdate_security_app.c
  18. )
  19. endif()
  20. if(CONFIG_SOC_8811)
  21. add_library(${target} STATIC
  22. src/fupdate_security_pack.c
  23. src/88xx/fupdate_security_app.c
  24. )
  25. endif()
  26. if(CONFIG_SOC_8850)
  27. add_library(${target} STATIC
  28. src/fupdate_security_pack.c
  29. src/88xx/fupdate_security_app.c
  30. )
  31. endif()
  32. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  33. set_target_properties(${target} PROPERTIES OUTPUT_NAME fupdate_security_app)
  34. target_include_directories(${target} PUBLIC include)
  35. target_include_targets(${target} PRIVATE kernel fs sffs calclib driver hal)
  36. relative_glob(srcs src/*.[ch] src/8910/*.c src/88xx/*.c include/fupdate_security.h)
  37. beautify_c_code(${target} ${srcs})
  38. set(target fupdate_security_boot)
  39. if(CONFIG_SOC_8910)
  40. add_library(${target} STATIC
  41. src/fupdate_security_pack.c
  42. src/8910/fupdate_security_boot.c
  43. )
  44. endif()
  45. if(CONFIG_SOC_8811)
  46. add_library(${target} STATIC
  47. src/fupdate_security_pack.c
  48. src/88xx/fupdate_security_boot.c
  49. )
  50. endif()
  51. if(CONFIG_SOC_8850)
  52. add_library(${target} STATIC
  53. src/fupdate_security_pack.c
  54. src/88xx/fupdate_security_boot.c
  55. )
  56. endif()
  57. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  58. set_target_properties(${target} PROPERTIES OUTPUT_NAME fupdate_security_boot)
  59. target_include_directories(${target} PUBLIC include)
  60. target_include_targets(${target} PRIVATE bootloader kernel fs sffs calclib driver hal)
  61. include(core.cmake)