Closed enetheru closed 1 month ago
I know why its failing.
# Default build type is Debug in the SConstruct
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Debug)
endif()
I'll fix the commit so it adds only the --config to the build command so its correct in both places.
I'm in the middle of compiling right now or i would squash these two commits.
Cherry-picked for 4.2 in PR https://github.com/godotengine/godot-cpp/pull/1631
Cherry-picked for 4.3 in PR https://github.com/godotengine/godot-cpp/pull/1632
Visual Studio projects are multi-config projects like Ninja-MultiConfig which means you can't set the configuration at configure time as there are multiple, it always chooses the first one by default when not specified in the build command.
Instead of this: cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 17 2022" . cmake --build . --verbose
It should be this cmake -G"Visual Studio 17 2022" . cmake --build . --verbose --config Release
Because the existing cmake solution does not use generator expressions for its per config configuration, we actually have to specify it in both commands :(
cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 17 2022" . cmake --build . --verbose --config Release
Fixes https://github.com/godotengine/godot-cpp/issues/1582