From the cmake docs:
"This may have effects such as suppressing warnings or skipping the contained headers in dependency calculations (see compiler documentation). Additionally, system include directories are searched after normal include directories regardless of the order specified."
Addresses part of #999
Changes the `<godot/gdextension_interface.h>` include to simply
`<gdextension_interface.h>`.
Refactor and better document the SCons and CMake logic around setting
the paths to the header and API JSON file.
Non-exhaustive list of case-sensitive renames:
GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension -> Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION -> EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
- instead of setting globals which can effect other projects including this as a subdirectory, set them on the target if possible
- add "CONFIGURE_DEPENDS" to GLOBs to check for changes
- update required CMake version to 3.12 (still ancient - 2018) to support these
* Attach debug flags to the target and mark as `PUBLIC`. This will allow all
projects that use bindings not to add the same defines manually.
* Use generator-expressions to support multiconfig generators (such as
MSVC).
* Remove excplitic `NDEBUG` and `_DEBUG` flags, CMake handles it
automatically.
changes so this cmake file can be used as a subdirectory
```
add_subdirectory(godot-cpp)
project(project-name)
add_library(project-name SHARED src/init.cpp)
target_link_libraries(project-name godot-cpp)
```