Fix builds on Windows #156
Open
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.
I was experiencing #144 and managed to generate working build files (via
cmake -B build . -DCMAKE_TOOLCHAIN_FILE=.\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release) after making these changes.I'm using a preview version of Visual Studio 2022, which emits some warnings when calling
cmake --build build --target nvui --config Release, however, they all seem to be related to visual studio libraries, not code within nvui itself.If I modify
CMakeLists.txtto not treat warnings as errors the binary builds and runs as expected.It's likely these warnings are not present in stable versions of VS, but I haven't checked.
I also didn't check any other combination of generators, compilers, nor platforms. So it would be good if someone could verify this doesn't break other combinations. (unless the CI picks this up and decides it's okay, then it's probably safe enough)