aseprite / laf

A C++ library to create desktop applications
https://aseprite.github.io/laf/
MIT License
276 stars 60 forks source link

Fix Windows build #48

Closed chaosink closed 4 months ago

chaosink commented 1 year ago
find_library() is not a proper way for finding OpenGL libraries.
On Windows, SKIA_OPENGL_LIBRARY got "SKIA_OPENGL_LIBRARY-NOTFOUND"
without using VS-Dev-CMD.

See discussions here:
    https://gitlab.kitware.com/cmake/cmake/-/issues/19804
    https://gitlab.kitware.com/cmake/cmake/-/issues/20226

Use find_package(OpenGL) and OpenGL::GL instead.
On Windows systems with non-English locales, the wide strings may cause
"Error C2001: Newline in constant".

2 solutions:
    Save the file with UTF-8 with BOM (byte-order mark).
    Specify UTF-8 charset for compilation. Used by this commit.

See discussions here:
    https://github.com/libusb/libusb/issues/207#issuecomment-288664124

I agree that my contributions are licensed under the MIT License. You can find a copy of this license at https://opensource.org/licenses/MIT

dacap commented 4 months ago

Thanks @chaosink for this but I'm not sure that these changes are really required.