msdfgl icon indicating copy to clipboard operation
msdfgl copied to clipboard

[WIP] CMake rework

Open mattparks opened this issue 5 years ago • 4 comments

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

mattparks avatar Jan 19 '20 22:01 mattparks

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.

nyyManni avatar Feb 14 '20 19:02 nyyManni

Hm... Did you test it under Linux?

xornet-sl avatar Apr 05 '20 04:04 xornet-sl

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.

nyyManni avatar Apr 06 '20 18:04 nyyManni

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?

nyyManni avatar Apr 11 '20 17:04 nyyManni