CMakeLists.txt 528 B

12345678910111213141516171819202122
  1. set(SUBDIRS "mbedtls")
  2. aux_source_directory(. DIR_SRCS)
  3. string(REGEX REPLACE ".*/(.*)" "\\1" LIB_NAME ${CMAKE_CURRENT_SOURCE_DIR})
  4. if (DIR_SRCS)
  5. foreach(libname ${LIBNAMES})
  6. if (${LIB_NAME} STREQUAL ${libname})
  7. add_library(${libname} ${CMAKE_LIB_TYPE} ${DIR_SRCS})
  8. target_link_libraries(${libname} "platform" "mbedtls")
  9. endif()
  10. endforeach()
  11. else()
  12. message(WARNING "not find is src file!")
  13. endif()
  14. foreach(subdir ${SUBDIRS})
  15. add_subdirectory(${subdir})
  16. endforeach()