CMakeLists.txt 450 B

12345678910111213141516171819
  1. aux_source_directory(. DIR_SRCS)
  2. string(REGEX REPLACE ".*/(.*)" "\\1" LIB_NAME ${CMAKE_CURRENT_SOURCE_DIR})
  3. if (DIR_SRCS)
  4. foreach(libname ${LIBNAMES})
  5. if (${LIB_NAME} STREQUAL ${libname})
  6. add_library(${libname} ${CMAKE_LIB_TYPE} ${DIR_SRCS})
  7. target_link_libraries(${libname} "mqtt" "platform" "network" "common")
  8. endif()
  9. endforeach()
  10. else()
  11. message(WARNING "not find is src file!")
  12. endif()