AtomicUtils.cmake 847 B

123456789101112131415161718192021
  1. macro(GroupSources curdir)
  2. if (WIN32)
  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()
  18. if (NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  19. set(LINUX TRUE CACHE BOOL "Indicates if host is Linux.")
  20. endif ()