123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- # Copyright (C) 2020 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
- # All rights reserved.
- #
- configure_file (
- "${ql_app_dir}/ql_app_feature_config.h.in"
- "${out_inc_dir}/ql_app_feature_config.h"
- )
- if(NOT QL_PROJECT_MIXER AND NOT CONFIG_QUEC_PROJECT_FEATURE_VSIM_ADAPT_STD)
- #APPIMG2
- if(QL_APP_FEATURE_APPIMG2)
- if (QL_APP_PACK_FILE)
- if (QL_CCSDK_BUILD)
- set(CONFIG_PACKAGE_FILE_APPIMG2_JSON_PATH ${QL_APP_PACK_FILE_JSON_PATH}) #Path to the preset file of APPIMG2
- else()
- set(CONFIG_PACKAGE_FILE_APPIMG2_JSON_PATH $ENV{prepack_json_path})
- endif()
- endif()
- #In this case, the code for APPIMG and APPIMG2 is the same.Customers can modify as required.
- set(target ${QL_APP2_BUILD_VER})
- if(CONFIG_APPIMG_LOAD_FLASH)
- add_appimg2_flash_ql_example(${target} ql_appimg2_init.c) #The c file where the appimg2 entry function resides,you can specify.
- endif()
- if(CONFIG_APPIMG_LOAD_FILE)
- add_appimg2_file_ql_example(${target} ql_appimg2_init.c)
- endif()
- target_link_libraries(${target} PRIVATE ql_app_nw ql_app_peripheral ql_app_osi ql_app_dev ql_app_sim ql_app_power apploader)
- if(QL_APP_FEATURE_USB)
- target_link_libraries(${target} PRIVATE ql_app_usb)
- endif()
- if(QL_APP_FEATURE_FILE_ZIP)
- target_link_libraries(${target} PRIVATE ql_app_zip)
- endif()
- if(QL_APP_FEATURE_FTP)
- target_link_libraries(${target} PRIVATE ql_app_ftp)
- endif()
- if(QL_APP_FEATURE_HTTP)
- target_link_libraries(${target} PRIVATE ql_app_http)
- endif()
- if(QL_APP_FEATURE_MMS)
- target_link_libraries(${target} PRIVATE ql_app_mms)
- endif()
- if(QL_APP_FEATURE_MQTT)
- target_link_libraries(${target} PRIVATE ql_app_mqtt)
- endif()
- if(QL_APP_FEATURE_SSL)
- target_link_libraries(${target} PRIVATE ql_app_ssl)
- endif()
- if(QL_APP_FEATURE_PING)
- target_link_libraries(${target} PRIVATE ql_app_ping)
- endif()
- if(QL_APP_FEATURE_NTP)
- target_link_libraries(${target} PRIVATE ql_app_ntp)
- endif()
- if(QL_APP_FEATURE_FIREWALL)
- target_link_libraries(${target} PRIVATE ql_app_firewall)
- endif()
- if(QL_APP_FEATURE_LBS)
- target_link_libraries(${target} PRIVATE ql_app_lbs)
- endif()
- if(QL_APP_FEATURE_QTHSDK)
- target_link_libraries(${target} PRIVATE ql_app_qthsdk)
- endif()
- if(QL_APP_FEATURE_CTSREG)
- target_link_libraries(${target} PRIVATE ql_app_ctsreg)
- endif()
- if(QL_APP_FEATURE_SOCKET)
- target_link_libraries(${target} PRIVATE ql_app_socket)
- endif()
- if(QL_APP_FEATURE_AUDIO)
- target_link_libraries(${target} PRIVATE ql_app_audio)
- if(QL_APP_FEATURE_TTS)
- if(NOT CONFIG_QUEC_PROJECT_FEATURE_TTS_IN_KERNEL)
- add_library(ql_tts_api2 STATIC IMPORTED)
- set_target_properties(ql_tts_api2 PROPERTIES IMPORTED_LOCATION ${SOURCE_TOP_DIR}/components/newlib/armca5/libql_api_tts.a)
- target_link_libraries(${target} PRIVATE ql_app_tts ql_tts_api2 ${libm_file_name})
- else()
- target_link_libraries(${target} PRIVATE ql_app_tts ${libm_file_name})
- endif()
- endif()
- endif()
-
- if(QL_APP_FEATURE_WIFISCAN)
- target_link_libraries(${target} PRIVATE ql_app_wifi_scan)
- endif()
- if(QL_APP_FEATURE_BT)
- target_link_libraries(${target} PRIVATE ql_app_bt)
- endif()
- if(QL_APP_FEATURE_BT_HFP)
- target_link_libraries(${target} PRIVATE ql_app_bt_hfp)
- endif()
- if(QL_APP_FEATURE_BT_SPP)
- target_link_libraries(${target} PRIVATE ql_app_bt_spp)
- endif()
- if(QL_APP_FEATURE_BT_A2DP_AVRCP)
- target_link_libraries(${target} PRIVATE ql_app_bt_a2dp_avrcp)
- endif()
- if(QL_APP_FEATURE_BLE_GATT)
- target_link_libraries(${target} PRIVATE ql_app_ble_gatt)
- endif()
- if(QL_APP_FEATURE_GNSS)
- target_link_libraries(${target} PRIVATE ql_app_gnss)
- endif()
- if(QL_APP_FEATURE_HD_GNSS)
- target_link_libraries(${target} PRIVATE ql_app_hd_gnss)
- endif()
- if(QL_APP_FEATURE_LCD)
- target_link_libraries(${target} PRIVATE ql_app_lcd)
- endif()
- if(QL_APP_FEATURE_LVGL)
- target_link_libraries(${target} PRIVATE ql_app_lvgl)
- endif()
- if(QL_APP_FEATURE_CAMERA)
- target_link_libraries(${target} PRIVATE ql_app_camera)
- endif()
- if(QL_APP_FEATURE_FILE)
- target_link_libraries(${target} PRIVATE ql_app_file)
- endif()
- if(QL_APP_FEATURE_SMS)
- target_link_libraries(${target} PRIVATE ql_app_sms)
- endif()
- if(QL_APP_FEATURE_VOICE_CALL)
- target_link_libraries(${target} PRIVATE ql_app_voice_call)
- endif()
- if(QL_APP_FEATURE_VOLTE)
- target_link_libraries(${target} PRIVATE ql_app_volte)
- endif()
- if(QL_APP_FEATURE_STK)
- target_link_libraries(${target} PRIVATE ql_app_stk)
- endif()
- if(QL_APP_FEATURE_VSIM_ADAPT)
- target_link_libraries(${target} PRIVATE ql_app_vsim_adapt)
- endif()
- if(QL_APP_FEATURE_SPI)
- target_link_libraries(${target} PRIVATE ql_app_spi)
- endif()
- if(QL_APP_FEATURE_SPI_NOR_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_spi_nor_flash)
- endif()
- if(QL_APP_FEATURE_SPI4_EXT_NOR_SFFS)
- target_link_libraries(${target} PRIVATE ql_app_spi4_ext_nor_sffs)
- endif()
- if(QL_APP_FEATURE_SPI6_EXT_NOR)
- target_link_libraries(${target} PRIVATE ql_app_spi6_ext_nor_flash)
- endif()
- if(QL_APP_FEATURE_SPI_NAND_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_spi_nand_flash)
- endif()
- if(QL_APP_FEATURE_DECODER)
- add_library(ql_decoder_api2 STATIC IMPORTED)
- set_target_properties(ql_decoder_api2 PROPERTIES IMPORTED_LOCATION ${SOURCE_TOP_DIR}/components/newlib/armca5/libql_api_decoder.a)
- target_link_libraries(${target} PRIVATE ql_app_decoder ql_decoder_api2 ${libm_file_name})
- endif()
- if(QL_APP_FEATURE_APP_IMG_AT)
- target_link_libraries(${target} PRIVATE ql_app_img_at)
- endif(QL_APP_FEATURE_APP_IMG_AT)
- if(QL_APP_FEATURE_RTC)
- target_link_libraries(${target} PRIVATE ql_app_rtc)
- endif()
- if(QL_APP_FEATURE_ALI_LINKSDK)
- target_link_libraries(${target} PRIVATE ql_ali_linkSDK)
- endif()
- if(QL_APP_FEATURE_QCLOUD_IOT)
- target_link_libraries(${target} PRIVATE ql_qcloud_iot)
- endif()
-
- if(QL_APP_FEATURE_VIRT_AT)
- target_link_libraries(${target} PRIVATE ql_app_virt_at)
- endif()
-
- if(QL_APP_FEATURE_HTTP_FOTA)
- target_link_libraries(${target} PRIVATE ql_app_http_fota)
- endif()
- if(QL_APP_FEATURE_FTP_FOTA)
- target_link_libraries(${target} PRIVATE ql_app_ftp_fota)
- endif()
-
- if(QL_APP_FEATURE_I2C)
- target_link_libraries(${target} PRIVATE ql_app_i2c)
- endif()
-
- if(QL_APP_FEATURE_FS_NAND_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_fs_nand_flash)
- endif()
-
- if(QL_APP_FEATURE_FS_NOR_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_fs_nor_flash)
- endif()
-
- if(QL_APP_FEATURE_SDMMC)
- target_link_libraries(${target} PRIVATE ql_app_sdmmc)
- endif()
- if(QL_APP_FEATURE_USBNET)
- target_link_libraries(${target} PRIVATE ql_app_usbnet)
- endif()
- if(QL_APP_FEATURE_SFTP)
- target_link_libraries(${target} PRIVATE ql_app_sftp)
- endif()
-
- if(QL_APP_FEATURE_MXML)
- target_link_libraries(${target} PRIVATE ql_app_mxml)
- endif()
- if(QL_APP_FEATURE_CLOUDOTA)
- target_link_libraries(${target} PRIVATE ql_app_cloudota)
- endif()
-
- if(QL_APP_FEATURE_EMBED_NOR_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_embed_nor_flash)
- endif()
-
- if(QL_APP_FEATURE_EXT_NOR_FLASH)
- target_link_libraries(${target} PRIVATE ql_app_ext_nor_flash)
- endif()
-
- if(QL_APP_FEATURE_HILINK)
- target_link_libraries(${target} PRIVATE ql_app_hilinksdk)
- target_link_libraries(${target} PRIVATE ql_app_hilinksdk ql_hilinksdk ${libm_file_name})
- endif()
-
- if(QL_APP_FEATURE_GPRS_DATA_TRANSFER)
- target_link_libraries(${target} PRIVATE ql_app_gprs_data_transfer)
- endif()
-
- if(QL_APP_FEATURE_TP)
- target_link_libraries(${target} PRIVATE ql_app_tp)
- endif()
-
- if(QL_APP_FEATURE_ALIOTSMARTCARD)
- target_link_libraries(${target} PRIVATE ql_app_aliotsmartcard)
- endif()
- if (QL_APP_FEATURE_ALIPAY_IOT_SDK)
- target_link_libraries(${target} PRIVATE ql_app_alipay_iot)
- endif()
-
- if(QL_APP_FEATURE_NTRIP_RTK)
- target_link_libraries(${target} PRIVATE ql_app_ntrip_rtk)
- endif()
- if(QL_APP_FEATURE_ETHERNET)
- target_link_libraries(${target} PRIVATE ql_app_ethernet)
- endif()
- endif()
-
- relative_glob(srcs *.h *.c)
- beautify_c_code(${target} ${srcs})
- endif()
|