CMakeLists.txt 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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/drv_config.h.in ${out_inc_dir}/drv_config.h)
  12. if(NOT ${CONFIG_KEYPAD_CSV_PATH} STREQUAL "")
  13. set(keypadcfg_h ${CMAKE_CURRENT_BINARY_DIR}/drv_keypad_def.h)
  14. set(csv_keypad ${SOURCE_TOP_DIR}/${CONFIG_KEYPAD_CSV_PATH})
  15. add_custom_command(OUTPUT ${keypadcfg_h}
  16. COMMAND python3 ${keypadgen_py} ${csv_keypad} ${keypadcfg_h}
  17. DEPENDS ${keypadgen_py} ${csv_keypad}
  18. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  19. )
  20. endif()
  21. if(CONFIG_QUEC_PROJECT_FEATURE_TEESDK_VTRUST)
  22. set(target vtrust)
  23. add_app_libraries($<TARGET_FILE:${target}>)
  24. add_library(${target} STATIC ${dummy_c_file})
  25. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  26. target_include_directories(${target} PUBLIC include)
  27. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} src)
  28. target_include_targets(${target} PRIVATE hal kernel fs fsmount nvm calclib apploader driver)
  29. add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src/vtrust)
  30. endif()
  31. set(target efuse_secure)
  32. add_app_libraries($<TARGET_FILE:${target}>)
  33. add_library(${target} STATIC ${dummy_c_file})
  34. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  35. target_include_directories(${target} PUBLIC include)
  36. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
  37. target_include_targets(${target} PRIVATE hal kernel fs fsmount nvm calclib apploader driver)
  38. if(CONFIG_QUEC_PROJECT_FEATURE_TEESDK_VTRUST)
  39. target_include_targets(${target} PRIVATE vtrust)
  40. endif()
  41. target_sources_if(CONFIG_SOC_8850 THEN ${target} PRIVATE
  42. src/drv_efuse.c
  43. src/drv_secure_8850.c
  44. )
  45. set(target driver_lcd)
  46. add_app_libraries($<TARGET_FILE:${target}>)
  47. add_library(${target} STATIC)
  48. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  49. target_include_directories(${target} PUBLIC include)
  50. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
  51. target_include_targets(${target} PUBLIC driver hal fs nvm)
  52. target_link_libraries(${target} PRIVATE hal)
  53. target_sources(${target} PRIVATE
  54. src/drv_lcd_cfg.c
  55. src/lcd/drv_lcd_gc9305.c
  56. src/lcd/drv_lcd_st7735s.c
  57. src/lcd/drv_lcd_st7567a.c
  58. )
  59. set(target driver_camera)
  60. add_app_libraries($<TARGET_FILE:${target}>)
  61. add_library(${target} STATIC)
  62. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  63. target_include_directories(${target} PUBLIC include)
  64. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
  65. target_include_targets(${target} PUBLIC driver hal fs nvm)
  66. target_link_libraries(${target} PRIVATE hal)
  67. target_sources(${target} PRIVATE
  68. src/image_sensor/image_sensor.c
  69. src/image_sensor/camera_gc032a.c
  70. src/image_sensor/camera_gc0310.c
  71. src/image_sensor/camera_bf20a6.c
  72. )
  73. set(target drv_host)
  74. add_app_libraries($<TARGET_FILE:${target}>)
  75. add_library(${target} STATIC ${dummy_c_file})
  76. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  77. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
  78. target_include_targets(${target} PUBLIC calclib apploader)
  79. target_link_libraries(${target} PRIVATE hal)
  80. target_sources(${target} PRIVATE
  81. src/hostcmd/drv_host_cmd_sys.c
  82. )
  83. set(target driver_charge)
  84. add_app_libraries($<TARGET_FILE:${target}>)
  85. add_library(${target} STATIC )
  86. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  87. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_DRIVER)
  88. target_compile_options(${target} PRIVATE "-Wnull-dereference")
  89. target_include_directories(${target} PUBLIC include src)#quec update
  90. target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} src)
  91. target_include_targets(${target} PRIVATE hal kernel fs fsmount diag nvm)
  92. target_link_libraries(${target} PRIVATE hal)#quec update
  93. target_sources(${target} PRIVATE
  94. src/drv_charger_8850.c
  95. )
  96. add_subdirectory_if_exist(src/usb_host)
  97. set(target driver)
  98. include(core.cmake)