MakeTargetDirs.cmake 415 B

1234567891011121314
  1. # makeTargetDirs(<file1> ... <fileN>)
  2. function(makeTargetDirs)
  3. foreach(TargetFile ${ARGV})
  4. get_filename_component(TargetAbsPath ${TargetFile} PATH)
  5. if(TargetAbsPath)
  6. if(NOT IS_ABSOLUTE ${TargetAbsPath})
  7. set(TargetAbsPath ${CMAKE_CURRENT_BINARY_DIR}/${TargetAbsPath})
  8. endif()
  9. if(NOT EXISTS ${TargetAbsPath})
  10. file(MAKE_DIRECTORY ${TargetAbsPath})
  11. endif()
  12. endif()
  13. endforeach()
  14. endfunction()