godot-cpp
godot-cpp copied to clipboard
Normalize CMake paths
Hi so today I tried generating C++ bindings for godot with CMake and I've stumbled on an issue around there.
Basically add_library
would fail on windows because paths seems to not be normalized, I managed to fix the issue by adding these lines of code before the add_library
call
string(REPLACE "\\" "/" PROJECT_NAME "${PROJECT_NAME}")
string(REPLACE "\\" "/" SOURCES "${SOURCES}")
string(REPLACE "\\" "/" SOURCES_FILE_LIST "${SOURCES_FILE_LIST}")
string(REPLACE "\\" "/" HEADERS "${HEADERS}")
string(REPLACE "\\" "/" HEADERS_FILE_LIST "${HEADERS_FILE_LIST}")
I'm not very familiar with github so I'm unsure how to request a change so ill just post the fix there and let someone do it for me.
Could you try this PR https://github.com/godotengine/godot-cpp/pull/536 we are waiting to be merged?
Could you try this PR #536 we are waiting to be merged?
Oh my bad didn't notice this PR, well either ways it works so I guess I'm closing this issue
Reopening, as the pull request still needs to be merged to fix this.