CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233
  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(src/core_config.cmake.in ${out_lib_dir}/core_config.cmake)
  12. set(core_export ${CMAKE_CURRENT_BINARY_DIR}/core_export.o)
  13. set(export_list ${CMAKE_CURRENT_SOURCE_DIR}/src/core_export.list)
  14. cpp_only(export_list_gen src/core_export.list)
  15. add_custom_command(OUTPUT ${core_export} ${core_stub_o}
  16. COMMAND ${corestubgen} -p ${CONFIG_SOC} --export ${core_export}
  17. --stub ${core_stub_o} $<TARGET_OBJECTS:export_list_gen>
  18. DEPENDS $<TARGET_OBJECTS:export_list_gen>
  19. )
  20. set(target apploader)
  21. add_app_libraries($<TARGET_FILE:${target}>)
  22. add_library(${target} STATIC src/app_loader.c ${core_export})
  23. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  24. target_include_directories(${target} PUBLIC include)
  25. target_include_targets(${target} PRIVATE kernel fs calclib driver hal)
  26. relative_glob(srcs include/*.h src/*.[ch])
  27. beautify_c_code(${target} ${srcs})