Improve cmake support, with installation #38
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this was only tested on "x64 Native Tools Command Prompt" environment on Windows, using the clang compiler, next month Linux support will be tested.
With that, Nene it's not supposed to be used as a sub-directory of a game project (unless if the developer choice to), instead, Nene should be used just as SDL2 it's generally used: having a single (at least per-version) compiled version available on the system.
With basic support to CMake install (
cmake --install
), that's easier to accomplish, for instance, all thedll
s required to run the game are easily available on thebin
directory of the installation directory (that is, cmake's "prefix"), while the required headers for compilation are available on theinclude
, and thenene.lib
static library onlib
directory.Here's a example to compile a single C source file (using clang on Windows, consider that nene was installed using
cmake --install build --prefix nene
, that is, the final output it's on thenene
directory):This PR is related with #36.