ps2dev / ps2sdk-ports

Ports of useful libraries to PS2SDK
Other
107 stars 43 forks source link

Use CMake for compiling some libraries #61

Closed fjtrujy closed 3 years ago

fjtrujy commented 3 years ago

Description

This PR basically use CMake to compile some ports without any additional change (thanks @rickgaiser for the idea).

The libraries being compiled with CMake are:

Additionally, I have also added:

All these libraries were previously git submodules, and it was creating more issues than adventages, so now they are downloaded using git clone to a build folder.

The cmake file used for the compilation is being copied as well to the toolchain, so it will be available at: $(PS2SDk)/ps2dev.cmake, so you can use that file for compile easily other projects.

Finally, I have also improved the CI and the scrips using the available cores during compilation, making the compilation shorter.

PS: I have also removed from git submodules the libtap library and now it is also using git clone

Thanks

rickgaiser commented 3 years ago

The git submodules where always trouble for me, so thank you for this. Only 2 things:

fjtrujy commented 3 years ago

So about freetype I'm not really sure, but I think that something changed since that date.

This is the size with the legacy toolchain

Screenshot 2021-02-18 at 10 38 04

This is the size with the new toolchain, but using the custom compilation

Screenshot 2021-02-18 at 10 38 11

And this is the size of the library using the generic compilation and cmake

Screenshot 2021-02-18 at 10 38 20

I didn't check what's the final OPL result, but I don't expect bigger than before LOL

About libtap I just migrate to git clone the libraries used with cmake, I can migrate libtap as well from git submodules to git clone, is up to you.

Thanks

fjtrujy commented 3 years ago

Actually, I have just updated freetype to the new official git and the latest version available as well. Still 13kb less than the previous implementation.

Screenshot 2021-02-18 at 11 01 04
fjtrujy commented 3 years ago

@rickgaiser I have removed libtap as well from the submodules!

Take a look