160 Commits

Author SHA1 Message Date
David Snopek
fe68c22c3e Generate GDExtension interface header and loader from JSON 2025-12-18 12:09:41 -06:00
David Snopek
618ee44a23 Add smoke test with Tween to check for issues with handling RefCounted 2025-10-28 14:29:10 -05:00
David Snopek
309b17b6eb Test that internal classes work as expected 2025-07-23 13:53:52 -05:00
David Snopek
d5baa7071e Merge pull request #1757 from Repiteo/ci/version-bumps
CI: Various version bumps; sync with main repo
2025-06-07 14:13:14 -05:00
Thaddeus Crews
64cdf089d9 CI: Various version bumps; sync with main repo 2025-04-26 12:23:07 -05:00
David Snopek
f38c056b67 Fix classes without _to_string() always returning "[Wrapped:0]" 2025-04-25 15:54:41 -05:00
Hugo Locurcio
552a74c96e Update test project to Godot 4.4 2025-04-03 16:40:19 +02:00
Samuel Nicholas
f83f364144 CMake: XCode dependency chain fixes - remastered
When attempting to generate XCode projects it would fail due to the target dependency chain not meeting expectations.

This PR, adds the required dependency infomation so that the XCode generator works.
2025-03-14 10:10:33 +10:30
David Snopek
d8807a10d6 Merge pull request #1734 from Repiteo/style/pragma-once
Replace header guards style with `#pragma once`
2025-03-13 11:47:14 -05:00
Samuel Nicholas
89abe15268 CMake: Target as configuration option
Add GODOTCPP_TARGET configuration option
Remove loop to generate the godot-cpp.<target> CMake Targets

Rename test bindings target
Update documentation
2025-03-12 08:58:59 +10:30
Thaddeus Crews
7056c996dd Style: Replace header guards with #pragma once 2025-03-07 17:58:10 -06:00
Samuel Nicholas
2f6d7f2dad add gersemi to pre-commit hooks for CMake formatting like black 2025-03-04 13:58:39 +10:30
Samuel Nicholas
d0dd282d73 CMake: Rename all GODOT_ to GODOTCPP_
This is for discussion primarily at this stage.
2025-03-01 10:50:55 +10:30
Samuel Nicholas
35469fd839 Turn python_callouts.cmake into GodotCPPModule.cmake
Move the find_package for python into it.
Recommend adding godot-cpp/cmake to CMAKE_MODULE_PATH and using include( GodotCPPModule ) to use functions.
Add target_doc_sources function to simplify the addition of documentation to a binary.
2025-02-15 09:04:12 +10:30
Samuel Nicholas
91f81f51e1 CMake: Implement 'threads' Option
Add the GODOT_THREADS option and related supporting code
Includes naming cleanups
2025-02-04 09:08:35 +10:30
David Snopek
13cd2d921c Merge pull request #1628 from IvanInventor/typed_dict_regression_fix
fix typed_dictionary compile-time regression
2025-01-21 11:15:42 -06:00
Samuel Nicholas
8814ac51ac CMake: Support for XML documentation
Add new function generate_doc_source to python_callouts.cmake
Update Test extension to use generate_doc_source function and include generated file in the build.

Cleanup:
Fix godotcpp.py imports after rebase
Pre-Commit hook sorted python imports in doc_source_generator.py
- replace ${CMAKE_CURRENT_SOURCE_DIR} with ${godot-cpp_SOURCE_DIR} when referencing current working directory and script locations when invoking python scripts.

Co-authored-by: David Snopek <dsnopek@gmail.com>
2025-01-13 08:28:42 +10:30
David Snopek
012b8ffc3a Merge pull request #1658 from enetheru/name_clash
CMake: Alleviate target name clashes, visibility, and grouping.
2025-01-10 09:05:54 -06:00
Fabio Alessandrelli
c4f1abe3f9 [Bindings] Build profile now strips methods and skip files
This allows removing dependencies that are not explicitly unused by the
gdextension being built and is implemented using an intermediate json
API file with the methods and classes stripped (i.e. without touching
the file generators).
2025-01-07 20:33:12 +01:00
Samuel Nicholas
6f7293cef4 Alleviate CMake target name clashes, visibility, and grouping.
Simplify <platform>_generate cmake function signature, as TARGET_ALIAS and TARGET_NAME are still in scope and do not need to be passed.
Add USE_FOLDERS, and FOLDER properties to group targets in VS and XCode
Guard test target with GODOT_ENABLE_TESTING
Generate all three variants in the form godot-cpp.test.<target> to remove the -DTEST_TARGET option clutter.
Update the docs/cmake.rst with information about the testing target
Update the Github CI
2024-12-29 09:54:55 +10:30
Samuel Nicholas
542ab19a21 CMake: Handle GODOT_DEV_BUILD flag correctly
.dev is added to output artifacts
Warn users for specifying dev_build and Release build config
Update documentation with deviations to SCons
Update debug_symbols handling, its rolled into build config
Cleanup helper variables and comments
2024-12-07 09:50:59 +10:30
Lukas Tenbrink
daef7d48ea Add variant_internal.hpp.
This module contains VariantInternalType, VariantInternal, VariantGetInternalPtr, VariantInternalAccessor and VariantDefaultInitializer, allowing to access and manipulate Variant's internal values.
2024-11-28 15:15:03 +01:00
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
fa3dfa0e3c Merge pull request #1591 from dsnopek/variant-object-instance-id
Directly get object instance ID from `Variant` and implement `Variant::get_validated_object()`
2024-10-29 13:10:12 -05:00
David Snopek
7fca545885 Merge pull request #1574 from dsnopek/unicode-class-names
Allow unicode class names
2024-10-29 13:09:45 -05:00
Vano
7f47d3951e fix typed_dictionary compile-time regression 2024-10-21 04:13:12 +03:00
David Snopek
0602c32986 Directly get object instance ID from Variant and implement Variant::get_validated_object() 2024-10-17 09:58:52 -05:00
Thaddeus Crews
83c0f15ab9 SCons: Don't cache librarys 2024-09-30 11:26:06 -05:00
David Snopek
536ea8561e Allow unicode class names 2024-09-18 13:24:56 -05:00
Thaddeus Crews
2ffff669f5 Implement typed dictionaries 2024-09-17 15:05:16 -05:00
David Snopek
d477589104 Merge pull request #1520 from dsnopek/test-library-path-absolute
Add a test to ensure that library path is absolute
2024-08-27 17:45:23 -05:00
Aaron Franke
10c3d1bc5f Fix missing MAKE_TYPED_ARRAY_INFO for Packed*Arrays 2024-08-22 21:02:48 -07:00
David Snopek
92ace04989 Add a test to ensure that library path is absolute 2024-08-22 16:31:35 -05:00
David Snopek
316dde80ba Merge pull request #1505 from Repiteo/include-formatting
Fix `#include` formatting
2024-06-25 09:43:17 -05:00
Thaddeus Crews
999018e7d1 Fix #include formatting 2024-06-25 08:28:04 -05:00
Thaddeus Crews
e0d363aad8 Integrate .pre-commit-config.yaml 2024-06-24 15:43:55 -05:00
Fabio Alessandrelli
1186c488bd Add support for build profiles.
Allow enabling or disabling specific classes (which will not be built).
2024-06-15 16:19:41 +02:00
David Snopek
5d8f80bc55 Merge pull request #1446 from Daylily-Zeleen/daylily-zeleen/set_instance_and_instance_biding_in_Wrapped_constructor
Set instance and instance binding in `Wrapped` constructor.
2024-06-14 09:39:46 -05:00
David Snopek
4f7439d4cf Fix tests after upstream change to Node::to_string() 2024-06-12 09:22:14 -05:00
David Snopek
7f74fe7bb2 Fix undefined symbol error on Linux with virtual methods that take Node * arguments 2024-06-10 10:55:24 -05:00
Daylily-Zeleen
76cbc66785 Set instance and instance binding in Wrapped constructor. 2024-05-28 22:59:37 +08:00
David Snopek
340dde31a2 Merge pull request #1451 from Faless/build/to_threads_or_not_to_threads
[SCons] Add option to build without threads
2024-05-16 10:39:57 -05:00
David Snopek
88df025aa0 Clean up instance bindings for engine singletons to prevent crash 2024-05-10 19:51:31 -05:00
David Snopek
a434850069 Allow submitting documentation to the Godot editor 2024-05-07 11:08:18 -05:00
Fabio Alessandrelli
b0296bb562 [SCons] Add option to build without threads
This is relevant for the Web platform, where builds with and without
threads are incompatible.
2024-04-30 19:19:36 +02:00
David Snopek
2cd3d39108 Merge pull request #1405 from dsnopek/fix-null-object-arguments
Correctly handle `Object *` arguments that were encoded as `nullptr`
2024-04-29 16:46:46 -05:00
Thaddeus Crews
a537b4af4d Use GDREGISTER defines in example 2024-04-10 14:15:28 -05:00
David Snopek
37542dc2ec Correctly handle Object * arguments that were encoded as nullptr 2024-04-08 11:12:40 -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
A Thousand Ships
fb79d5ff98 Add support for getting argument count from Callables 2024-03-14 10:27:39 +01:00