CMakeLists.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright (C) 2018 LongSung Technologies Limited and/or its affiliates("LongSung").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # LongSung 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. LongSung reserves the right to make changes in the
  8. # software without notification. LongSung also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. cmake_minimum_required(VERSION 3.13)
  12. set(app_dir ./app)
  13. option(ENABLE_HGS_POC "使能海高思POC" ON)
  14. option(ENABLE_GWSD_POC "使能公网时代POC" OFF)
  15. if(ENABLE_GWSD_POC)
  16. add_definitions(-D ENABLE_GWSD_POC)
  17. set(gwsd_dir ./lib/gwsd)
  18. set(gwsd_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/gwsd/POC.lib)
  19. endif(ENABLE_GWSD_POC)
  20. option(ENABLE_TEST_FLASH "使能SPI FLASH测试" OFF)
  21. if(ENABLE_TEST_FLASH)
  22. set(spi_files ./flashInterface/spiFlash.c ./flashInterface/spiFlashFat.c)
  23. include_directories(./flashInterface)
  24. endif(ENABLE_TEST_FLASH)
  25. set(app_files ${app_dir}/ohpocapp.c
  26. ${app_dir}/board.c
  27. ${app_dir}/log.c
  28. ${app_dir}/poc.c
  29. ${app_dir}/app.c
  30. ${app_dir}/uio.c
  31. ${app_dir}/common.c
  32. ${app_dir}/setting.c
  33. ${app_dir}/message.c
  34. ${app_dir}/gpsCtl.c
  35. ${app_dir}/hook.c
  36. ${app_dir}/setSystemPara.c
  37. ${app_dir}/appAuth.c
  38. ${app_dir}/GUI/lcdDrv.c
  39. ${app_dir}/GUI/gui.c
  40. ${app_dir}/GUI/fonts.c
  41. ${app_dir}/uiEntry.c
  42. ${app_dir}/uiBlock.c
  43. ${app_dir}/Interface/Palace.c
  44. ${app_dir}/Interface/uiMenu.c
  45. ${app_dir}/Interface/ListBox.c
  46. ${app_dir}/Interface/ListBoxSMS.c
  47. ${app_dir}/Interface/NumEdit.c
  48. ${app_dir}/Interface/ManageMessage.c
  49. ${app_dir}/md5/mymd5.c
  50. ${spi_files})
  51. add_definitions(-w)
  52. include_directories(${app_dir} ${app_dir}/md5 ${app_dir}/GUI ${app_dir}/Interface ${gwsd_dir})
  53. if(ENABLE_HGS_POC)
  54. add_definitions(-D ENABLE_HGS_POC)
  55. set(app_lib ${CMAKE_CURRENT_SOURCE_DIR}/lib/libohpoc.a)
  56. endif(ENABLE_HGS_POC)
  57. add_appimg(${target} ${flash_ldscript} ${app_files})
  58. target_link_libraries(${target} PRIVATE ${app_lib} ${gwsd_lib})