msdfgl
msdfgl copied to clipboard
[WIP] CMake rework
This is a rewrite of the CMake build system, it makes many improvements to the build structure of this project:
- Removed
gen-shaders.bat
/gen-shaders.sh
, replaced with a proper CMake script - Merged msdfglshared and msdfglstatic libraries (configured though
BUILD_SHARED_LIBS
) - Option to disable example:
BUILD_MSDFGL_EXAMPLE
- DLL exports on Windows fixed
- Freetype2 and GLFW3 can be found on the system, or downloaded and built though FetchContent
Are you still considering this WIP?
- If no, I would be happy to merge this.
- If yes, what is still unfinished? I can tie up some loose ends too if you are not able to find the time.
Hm... Did you test it under Linux?
Cmake changes do not seem to work on Linux. I have not had the resources to test the DLL exports yet, those would be nice to get merged at some point.
I guess the cmake side is working sufficiently enough right now so that there is no urgent need to merge this.
I applied these changes here to my own branch, and fixed the missing dependency for the shader header. The header file was not being regenerated after the glsl files had changed.
Setup is now building nicely on Linux and macOS. However, I did not manage to get it work on Windows. It is probably due to the dll-build, as it seems to die when it does the first call to gl-functions from msdfgl.dll. calls directly from the msdfgldemo.exe seemed ok. My Windows-knowledge is rather weak...
@mattparks did you get the new buildsystem to work on Windows?