Fix default library filename generation in CMakeLists.txt #687
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.
The repository's CMakeLists.txt file was not reliably giving a library file of the name structure
godot-cpp.<platform>.<build_type>.<system_bits>
. Tested on Windows using MSVC and CMake v3.19, which gave me the mysterious file:godot-cpp.windows..32.lib
, which is missing thebuild_type
entirely and detected 32-bit despite being on a 64-bit machine.While I'm unsure why
CMAKE_SIZEOF_VOID_P
was resolving as 4 on my 64-bit machine, I figured it would be nice to be able to explicitly specify the architecture like you can in the SConstruct file (withbits=64
). Additionally, the statementCMAKE_BUILD_TYPE STREQUAL ""
evaluates to false whenCMAKE_BUILD_TYPE
is not defined.With both of these updates, you should be able to replicate (using an out-of-source build on Windows as an example):