Commit Graph

3 Commits (4eaef4ca9a824e37594c3d0d57c5c985face900e)

Author SHA1 Message Date
Samuel Nicholas 732df06a81 CMake: Fix selection of MSVC Runtime compile flags
My last attempt at solving this was not correct. I have left lots of comments in the source detailing the issue as it will effect consumers.
2024-12-05 09:15:40 +10:30
Samuel Nicholas b7dbd26d8f Align MSVC runtime (MD[d], MT) options to engine #1647
Engine has an option to link to MDd debug_crt
add flag to SCons options
Add flag to CMAKE options
2024-11-28 13:46:41 +10:30
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