CMakeLists.txt 988 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (C) 2020 QUECTEL Technologies Limited and/or its affiliates("QUECTEL").
  2. # All rights reserved.
  3. #
  4. set(target ql_app_ethernet)
  5. add_library(${target} STATIC)
  6. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_app_lib_dir})
  7. target_compile_definitions(${target} PRIVATE OSI_LOG_TAG=LOG_TAG_QUEC)
  8. target_include_directories(${target} PUBLIC inc)
  9. include(./inc/ethernet_demo_macro.cmake)
  10. configure_file (./inc/ethernet_demo_macro.h.in ${out_inc_dir}/ethernet_demo_macro.h)
  11. set(SRC_FILES_PATH)
  12. #######################################
  13. if(ETHERNET_PHY_CH395)
  14. target_include_directories(${target} PUBLIC ./ch395/inc)
  15. list(APPEND SRC_FILES_PATH "./ch395/*.c;./ch395/*.C" )
  16. endif()
  17. ########################################
  18. file(GLOB SRC_FILES ${SRC_FILES_PATH})
  19. #message("${SRC_FILES}")
  20. target_sources(${target} PRIVATE
  21. ethernet_demo.c
  22. #ethernet_http_demo.c
  23. ${SRC_FILES}
  24. )
  25. relative_glob(srcs include/*.h src/*.c inc/*.h)
  26. beautify_c_code(${target} ${srcs})