CMakeLists.txt 366 B

1234567891011121314151617
  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. endif()
  8. endforeach()
  9. else()
  10. message(WARNING "not find is src file!")
  11. endif()