xmake
xmake copied to clipboard
Install options to discard some files
Is your feature request related to a problem? Please describe.
I have a pretty large project, and everytime I run xmake install it takes a very long time because it copies all the include files (60k files) that are not needed.
Describe the solution you'd like
Options for xmake install to discard includes/libs/bins.
Describe alternatives you've considered
No response
Additional context
No response
add_headerfiles("include/**.h|exclude/*.h")
use ...|exclude pattern
to set exclude pattern. and add_installfiles
support it too.
or
remove_headerfiles
sometimes you just want to install (or just update) binaries, for example with android development headers are installed (even though I just want the binaries).
Also headerfiles are used for project generations
sometimes you just want to install (or just update) binaries, for example with android development headers are installed (even though I just want the binaries).
Also headerfiles are used for project generations
add_headerfiles("", {install = false})
yes the point is sometimes you want to have headers, sometimes you don't, and it does not depends on the project configuration (xmake.lua) but on what you want to do.
For example, I sometimes install my project in a folder in order to have the binaries and their dependencies so I can ship them. but sometimes I want to install it system-wide, the very same project.
So I agree here it would be nice to have a way to install only binaries at least
sometimes you just want to install (or just update) binaries, for example with android development headers are installed (even though I just want the binaries). Also headerfiles are used for project generations
add_headerfiles("", {install = false})
sometimes you just want to install (or just update) binaries, for example with android development headers are installed (even though I just want the binaries).
Also headerfiles are used for project generations
option("xxx")
add_headerfiles("", {install = get_config("xxx")})
xmake f --xxx=y
xmake install
I already pointed out the main issue with xmake config (xmake f), it's that you have to set all of your configurations because xmake doesn't support incremental config.
so you'd have to remember to do xmake f --tests=y --usepch=y --assimp=y --ffmpeg=y --embed_plugins=y --install_headers=n
, not very practical.
Also, xmake install also copies lib files (such as .lib and more), you can't disable these.
A simple xmake install --bin
to only copy the bin folder on Windows or .so/.dynlib on others would be a nice addition imo.
I already pointed out the main issue with xmake config (xmake f), it's that you have to set all of your configurations because xmake doesn't support incremental config.
so you'd have to remember to do , not very practical.
xmake f --tests=y --usepch=y --assimp=y --ffmpeg=y --embed_plugins=y --install_headers=n
Also, xmake install also copies lib files (such as .lib and more), you can't disable these.
A simple to only copy the bin folder on Windows or .so/.dynlib on others would be a nice addition imo.
xmake install --bin
you can add on_install
to do it.
I'm not talking about just copying the final binary produced by a target but also all of its dependencies, something xmake install
already does and is not easy to reimplement.
我也同样希望有一个选项,可以仅安装二进制文件,而不是部署库模式。
虽然可以通过每个库去设置add_headerfiles("", {install = false})
,去移除不必要的头文件,但在大工程里,每个库都要去这样设置显然是有点多余。此外lib文件夹的部署,似乎没有选项去控制。
所以还是希望形如xmake install --bin
,这样的入参,仅部署可执行文件和其依赖的库。
此外,还希望xmake能够支持增量式拷贝。如windows的robocopy
和 linux的rsync
,在部分工程可能需要拷贝多个大资源时,部署需要花费不少时间。
Bot detected the issue body's language is not English, translate it automatically.
I would also like to have an option to just install the binaries instead of deploying the library mode.
Although you can set add_headerfiles("", {install = false})
through each library to remove unnecessary header files, but in a large project, it is obviously redundant to set this way for each library. In addition, there seems to be no option to control the deployment of the lib folder.
Therefore, it is still hoped that the input parameters such as xmake install --bin
will only deploy the executable file and the libraries it depends on.
In addition, it is also hoped that xmake can support incremental copying. Such as windows' robocopy
and linux's rsync
, when some projects may need to copy multiple large resources, the deployment will take a lot of time.