“make dist” equivalent in CMake

前端 未结 2 1260
时光取名叫无心
时光取名叫无心 2020-12-31 13:07

According to FAQ, CMake doesn\'t create a make dist target and source package can be created using CPack. But CPack just makes a tarball of the source directory

2条回答
  •  别那么骄傲
    2020-12-31 13:42

    Simon is correct above but does not give a full answer. With git you can generate a compatible tar ball archive with the git archive command.

    This example with the version is compatible with make dist of yesteryear.

    git archive --format=tar.gz -o my-repo-0.01.tar.gz --prefix=my-repo-0.01/ master
    

    See: https://gist.github.com/simonw/a44af92b4b255981161eacc304417368

提交回复
热议问题