Commit Graph

11 Commits (a42b3634d20b4e7088be721792bba1199277362c)

Author SHA1 Message Date
Samuel Nicholas 8534e2104f Modernise Existing CMakeLists.txt
- Added to .gitignore CMakeUserPresets.json

### Configuration:
- Changed python command to use single quotes to make build output log more legible.
- Added GODOT_DEV_BUILD to allow differentiation of debug or Release builds.
- Added find logic for macos Cocoa library

### godot-cpp Changes
- godot-cpp-test is changed to be incorporated into the cmake build as a target.
- Duplicated godot-cpp target into [template_release, template_debug, editor]
- Created {platform}.cmake files mirroring the style of the SCons build.

CMake has a feature called generator expressions for its configuration variables that are evaluated at build time. This allows multi-configuration build systems to properly evaulate options. for msvc, xcode and nijna multi-config.

- Moved configuration options to generator expressions with the notable exclusion of OSX_ARCHITECTURES.
- Remove CMAKE_BUILD_TYPE from msvc CI target as Multi-Config generators ignore it

### godot-cpp-test Changes
- Removed majority of the cmake code, now that the godot-cpp project is setup, the majority of the flags will be propagated as transient dependencies
- Marked with EXCLUDE_FROM_ALL so that it isn't built as part of the 'all' target
- Updated ci to build the godot-cpp-test target from the root directory using cmake
- Tests passing for Windows, Linux, and Macos builds.

### Documentation
Updated with new information
Added Emscripten example
Added Android example
2024-11-21 11:01:00 +10:30
David Snopek 536ea8561e Allow unicode class names 2024-09-18 13:24:56 -05:00
ytnuf 5c12bd2287 Change cmake_minimum_required to match actual requirements
This is because target_link_options was added in v3.13
So this wouldn't build with cmake v3.12

Likewise in CMAKE_CXX_STANDARD only supports value of 17 starting with
cmake v3.9
So the test wouldn't build properly with cmake v3.6
2024-03-22 13:55:34 +00:00
Rémi Verschelde 41517eacb1
CMake: Remove hardcoded warnings list and forcing -Werror on library builds
The CMake buildsystem should be completely reviewed to properly match
what is done by SCons, instead of making its own arbitrary decisions on
how godot-cpp should be compiled.

Currently the SCons setup doesn't include warning options, so CMake
shouldn't either. Options similar to upstream Godot's SCons setup could
be added, and then replicated for CMake.
2023-12-01 10:45:07 +01:00
Rémi Verschelde bf1c03ab5f
SCons: Disable C++ exception handling by default
Counterpart to https://github.com/godotengine/godot/pull/80612.
2023-10-22 12:45:46 +02:00
Rémi Verschelde bab247dcb6
Rename godot-headers to gdextension, move header to top folder
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.
2022-12-14 12:36:59 +01:00
Fabio Alessandrelli 081d425277 [MSVC] Add NOMINMAX flag to scons and cmake.
Ensures user inclusion of windows.h do not define "min" and "max"
macros.
2022-09-12 13:12:55 +02:00
bruvzg 0ee980abae
Rename OSX to macOS. 2022-07-20 11:01:47 +03:00
Rémi Verschelde 82bc102581 Sync `misc/` scripts and hooks with upstream Godot 2022-03-15 10:18:33 +01:00
Nicolás Carrasco f227a0179f Fix Test CMake project for Windows and parametrize paths 2022-01-26 20:12:05 +01:00
O01eg c5fd3d00d2
Test CMake project with CI (#518) 2021-12-24 01:29:21 +01:00