Quoting Jose Fonseca (2017-03-28 09:19:48) > On 28/03/17 00:12, Dylan Baker wrote: > > > > Okay, I have libepoxy working for windows. I also got libepoxy working as a > > subproject, but it took a bit of hacking on their build system (there's > > some things they're doing that make them non-subproject safe, I'll send > > patches > > and work that out with them. > > > > https://github.com/dcbaker/libepoxy.git fix-suproject > > Thanks. > > GLEW is not the only one case though. There's also FREEGLUT. So we > can't really avoid the problem of external windows binaries/subprojects. > > So I've been thinking, and I suspect is better if first get things > working with binary GLEW / FREGLUT projects, then try the glew -> > libepoxy in a 2nd step, so there's less to take in to merge meson into > master.
Is freeglut a hard requirement? At least in autoconf we have logic to look for both, and use #defines to enable freeglut only features. > > > Clone that repo into $mesa-demos-root/subprojects and things should just > > work, > > or mostly work. I got epoxy compiling, but ran into some issues in the > > mingw glu > > header. > > > > Dylan > > I'm pretty sure the problem with MinGW glu is the lack of windows.h. We > need to do the same as CMakeLists.txt snippet quoted below. > > I'm running out of time today, but I'll look into porting this over to > meson tomorrow if you don't beat me to it. > > Jose > > > > if (WIN32) > # Nobody likes to include windows.h: > # - Microsoft's GL/gl.h header depends on windows.h but doesn't > include it; > # - GLEW temporarily defines the necessary defines but > undefines them later > # - certain GLUT distributions don't include it; > # - most of our programs are meant to be portable so don't > include it. > # > # We could try to replicate the windows.h definitions required by > # GL/gl.h, but the build time savings don't compensate the constant > # headaches that brings, so instead we force windows.h to be > included > # on every file. > if (MSVC) > add_definitions (-FIwindows.h) > else (MSVC) > add_definitions (--include windows.h) > endif (MSVC) > > # Don't define min/max macros > add_definitions (-DNOMINMAX) > > # MSVC & MinGW only define & use APIENTRY > add_definitions (-DGLAPIENTRY=__stdcall) > > link_libraries (winmm) > endif (WIN32) > I assumed it was probably something like that. I'll have a look. Dylan
signature.asc
Description: signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev