Skip to content

Commit

Permalink
CMake custom targets can output directories, not just files
Browse files Browse the repository at this point in the history
  • Loading branch information
markmaker committed Dec 22, 2023
1 parent 6ccd708 commit acde036
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/scripts/cmake_run_ctgt.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def run(argsv: T.List[str]) -> int:
if do_copy:
if expected.exists():
expected.unlink()
shutil.copyfile(str(generated), str(expected))
if generated.is_dir():
shutil.copytree(str(generated), str(expected))
else :
shutil.copyfile(str(generated), str(expected))

return 0

Expand Down

0 comments on commit acde036

Please sign in to comment.