It should be ok when folders exist. Exception shouldn't be thrown.
Update binding_generator.py
It should be ok when folds exist. It will fail to build without this patch, in vs code on windows with compiler ( visual studio community 2022 amd 64) .
Co-Authored-By: Chris Cranford <ccranfor@redhat.com>
(cherry picked from commit d79959c79e)
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.
(cherry picked from commit f83f364144)
The SCons build doesn't do this, so neither should CMake
Excpetions are already handled by DISABLE_EXCEPTIONS option
(cherry picked from commit 43690cb60b)
People seem to want to build godot-cpp without any arguments, not even specifying a target.
We have to detect if we are top level though because it conflicts with being consumed.
(cherry picked from commit 8b33e73353)
Previously I eschewed the use of CMAKE_MSVC_RUNTIME_LIBRARY in favour of setting the flags using target_compile_options so that they would propagate to consumers.
However, it has been raised that a dependency( independent to godot-cpp ) that doesn't set any runtime flags, which relies purely on the CMAKE_MSVC_RUNTIME_LIBRARY variable will very likely not have the correct msvc runtime flags set.
Where MSVC documentation states "All modules passed to a given invocation of the linker must have been compiled with the same runtime library compiler option (/MD, /MT, /LD)."
It was also mentioned that message type WARNING is not ideal for notifying consumers.
So I have updated the cmake code to use CMAKE_MSVC_RUNTIME_LIBRARY over target-compile_options. And set it as a CACHE STRING variable so that it can be overridden if desired. We still message consumers, but as a NOTICE.
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.
As described in issue #1690 the expression needs to depend on TARGET_ALIAS not TARGET_NAME.
This was introduced when I was solving the naming conflict issues and I missed this usage.
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>