Re: [Kicad-developers] ***UNCHECKED*** Re: Linux support for wxGLCanvas and Wayland/EGL

2020-09-30 Thread Ian McInerney
On Wed, Sep 30, 2020 at 2:53 PM Simon Richter 
wrote:

> Hi,
>
> On Wed, Sep 30, 2020 at 08:46:46AM -0400, Wayne Stambaugh wrote:
>
> > I'm fine with adding glew to the third party directory.  I'm assuming
> > that the plan would be to use cmake to determine if EGL support was
> > required and build glew accordingly.
>
> With the Debian Developer hat on: this needs an easily reachable OFF
> switch, because it makes packaging harder if projects ship outdated
> components as part of their source tree.
>

It is going behind *2* CMake flags - the first one is `KICAD_USE_EGL` which
will default to OFF and require the flag to be passed into CMake directly
to enable it. This flag will only have effect on Linux. Without this flag
set to ON, it will always use the system GLEW and there is no way around
that. The second is `KICAD_USE_BUNDLED_GLEW`. This will be dependent upon
the `KICAD_USE_EGL` flag, and will have absolutely no effect when
`KICAD_USE_EGL` is OFF (it will always use the system GLEW). When
`KICAD_USE_EGL` is ON this will default to ON and use the bundled GLEW, but
it can be switched off if the system can provide a proper GLEW compiled for
use with EGL (which no systems seem to be packaging).

There will be no auto-detection of EGL inside CMake because implementing
that detection is non-trivial and I don't have the time or motivation
to make it work - so it will always require developer interaction. I will
be adding `#error` macros into the code to flag-up the incompatibility if
we aren't compiled with `KICAD_USE_EGL` and wx is compiled with EGL.

-Ian
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] ***UNCHECKED*** Re: Linux support for wxGLCanvas and Wayland/EGL

2020-09-30 Thread Simon Richter
Hi,

On Wed, Sep 30, 2020 at 08:46:46AM -0400, Wayne Stambaugh wrote:

> I'm fine with adding glew to the third party directory.  I'm assuming
> that the plan would be to use cmake to determine if EGL support was
> required and build glew accordingly.

With the Debian Developer hat on: this needs an easily reachable OFF
switch, because it makes packaging harder if projects ship outdated
components as part of their source tree.

   Simon

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp