AtomicUtils.cmake 653 B

123456789101112131415161718192021222324252627
  1. macro(GroupSources curdir)
  2. if (MSVC)
  3. file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${curdir} ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/*)
  4. foreach(child ${children})
  5. if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/${child})
  6. if ("${curdir}" STREQUAL "")
  7. GroupSources(${child})
  8. else()
  9. GroupSources(${curdir}/${child})
  10. endif()
  11. else()
  12. string(REPLACE "/" "\\" groupname ${curdir})
  13. source_group(${groupname} FILES ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/${child})
  14. endif()
  15. endforeach()
  16. endif()
  17. endmacro()