Closed
Description
Issue description
When attempting to build the test project for this using CMake it fails do to looking for the godot-cpp library file
Output when attempting to build test project using VSCode's CMake extension:
[main] Building folder: test
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/bea/Desktop/godot-cpp/test/build --config Debug --target godot-cpp-test -j 26 --
[build] MSBuild version 17.4.0+18d5aef85 for .NET Framework
[build] Checking Build System
[build] Building Custom Rule C:/Users/bea/Desktop/godot-cpp/test/CMakeLists.txt
[build] example.cpp
[build] register_types.cpp
[build] Generating Code...
[build] LINK : fatal error LNK1104: cannot open file 'godot-cpp.windows.release.64.lib' [C:\Users\bea\Desktop\godot-cpp\test\build\godot-cpp-test.vcxproj]
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/bea/Desktop/godot-cpp/test/build --config Debug --target godot-cpp-test -j 26 -- exited with code: 1 and signal: null
[build] Build finished with exit code 1
My workaround
The current way I am working around this is adding "lib" to the beginning of this filename
Line 138 in f1d501f
and changing
Lines 112 to 121 in f1d501f
to
set(BITS x86_32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BITS x86_64)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_CPP_BUILD_TYPE Template_Debug)
else()
set(GODOT_CPP_BUILD_TYPE Template_Release)
endif()
Issues with my workaround
There are two problems with this second change. Firstly, for non x86 platforms the x86_
prefix in not valid. Secondly, while the only release binary build type is template_release
, both template_debug
and editor
are valid build types for a debug builds and can both be used by the editor if linked against, but this change only checks for template_debug
.
Metadata
Metadata
Assignees
Labels
No labels