examples: Add CMake glue to optionally build examples, as we do for the tests.

In fact, most of the CMake code was stolen from the test directory.
This commit is contained in:
Ryan C. Gordon
2024-07-23 00:56:57 -04:00
parent 2038620717
commit 16535b7ee2
4 changed files with 447 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ docs/README-main-functions.md (or view that page on the web on
## I would like to build and run these examples myself.
When you build SDL with CMake, you can add `-DSDL_BUILD_EXAMPLES=On` to the
When you build SDL with CMake, you can add `-DSDL_EXAMPLES=On` to the
CMake command line. When you build SDL, these examples will be built with it.
But most of these can just be built as a single .c file, as long as you point