Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using cmake #34

Merged
merged 9 commits into from
Apr 28, 2023
Merged

Using cmake #34

merged 9 commits into from
Apr 28, 2023

Conversation

Andre-LA
Copy link
Owner

@Andre-LA Andre-LA commented Apr 26, 2023

This PR closes #33

Building is now done through CMake, tested on Fedora Linux 38 and Windows 11 (VS 2022).

Dependencies (that is, all SDL2 libraries and it's respective dependencies) are bundled on external directory as git sub-modules, using git clone with --recurse-submodules flag will download all these dependencies, thus there's no need to install any dependencies using package managers.

Tasks:

  • Use CMake for building, with the same commands and steps
  • Rename build.sh to genbindings.sh
  • Edit README with build instructions and updated information (done but incomplete, finish this later)
  • Bundle and compile Lua locally just as SDL2 (delay to another PR)
  • Same for Teal (delay to another PR)

Respective versions: 2.6.3, 2.20.2 e 2.6.3
This will compile SDL libraries, dependencies, nene itself and the collisions.c example.
The main change it's the inclusion of `stdlib.h` header, since the example uses `EXIT_SUCCESS` and `EXIT_FAILURE`;

Seems that clang "tolerates" the non inclusion of stdlib.h file, but MSBuild didn't.
@Andre-LA Andre-LA added the enhancement New feature or request label Apr 26, 2023
@Andre-LA Andre-LA self-assigned this Apr 26, 2023
This removes `build.sh` and add `genbindings.sh`, which is a subset of the former without the building process.

Also, there's a new (and ignored by git) directory called `dumps`, where the dumps will now be output.
Now there's no need to use a very specific command, using:

```sh
$ cmake -S . -B build
$ cmake --build build
```

works.
This is quite incomplete, but turns out that the instructions are quite long and yet to be better tested, so I'm delaying this.
@Andre-LA Andre-LA merged commit ae6d103 into main Apr 28, 2023
@Andre-LA Andre-LA mentioned this pull request May 3, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use CMake
1 participant