CMake: Remove starting .
from GODOTCPP_SUFFIX
#1814
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a tiny but kinda annoying issue I want to fix.
During the configuration phase to get the binary suffix(eg windows.editor.x86_64) cmake builds up a generator expression out of the relevant pieces, and that expression is put into
GODOTCPP_SUFFIX
. Which is analagous enough to how scons builds the binary suffix, it so that part is all good.As it is currently, the first entry in the expression starts with a prepending
.
so that later when its used ike${PROJECT_NAME}${GODOT_SUFFIX}
the resulting binary looks likegodot-cpp.linux.template_release.x86_64.so
This
GODOTCPP_SUFFIX
varible is then attached to the godot-cpp target so that downstream projects can fetch it and use it for themselves, avoiding having to build up the suffix from the pieces themselves manually which can be a pain.So today I was wanting to use this suffix, but it comes with a leading
.
, and that's just not expected, and I think very rarely desired, considering all other use cases when getting parts of a whole, the delimiter isnt usually part of the resulting piece. ie a hypothetical functionget_extension
wouldn't provide.cpp
, it would just providecpp
So I want to remove the leading
.
, making the libname ~${PROJECT_NAME}.${GODOT_SUFFIX}
.The problem arises that it will effect consumer build artifacts if they use the
GODOTCPP_SUFFIX
variable, like I do, to name their libraries and configure related files. So if this change is accepted, I think it would need notice somehow provided to users, or fit into a specific release cycle of some sort. I'm not super familiar with release processes.Cheers,
Samuel.