Hj Paul,

On 23 April 2014 22:42, Paul Martz <[email protected]> wrote:
> I don't think you want the values of OPENGL_HEADER1 and OPENGL_HEADER2 to be
> in the CMake cache, as subsequently changing OPENGL_PROFILE would then fail
> to reset their values. I've attached a top-level CMakeLists.txt that
> addresses that issue.

I left them in the cache to allow users the option of modifying them
manually.  These changes are all experimental so I'm open to changing
this, but it may be best to make sure everything is working across
platforms first.

> Note that anyone who has ran CMake on current trunk
> will need to update with this change, then blow away their cache and start
> from scratch (or manually remove the OPENGL_HEADER* cache entries, which
> worked for me). Then run CMake again.

I had to remove the CMakeCache in my own testing, I don't know yet
whether we can avoid this.

> Here's something I noted: The include/osg/OpenGL is generated by CMake, but
> it gets places in the source tree include/osg directory rather than the
> CMake build directory (like, e.g., the Config header). This makes it
> impossible to have multiple build trees for a single source that use
> different OPENGL_PROFILE settings. Was this intentional?
>
> If not, you ought
> to be able to duplicate the pattern used for osg/Config to resolve the issue
> (and place osg/OpenGL in the build tree).

I followed the approach we had taken with the Config file, so in
theory it should be placed in the same place... but... answer to this
conundrum below

> Also, note that svn appears to have an include/osg/OpenGL already in place,
> which seems to be a mistake. If this file is auto-generated, it couldn't be
> under svn control.

I had thought that include/osg/Config was checked in so I checked
include/osg/OpenGL in, but in hindsight this wasn't required.  I'm
guess this is the source of the issue with the multiple build
issue/OpenGL header placement.

> Finally, my changes to have CMake automatically find the glcorearb.h file,
> using a CMake variable as a hint for its location, do not appear to be part
> of your changes (see osg-submissions, "FindGL3.cmake and related changes").
> As a result, my GL3 core profile build fails to find glcorearb.h at compile
> time. If you'd like, I can resubmit this modification, after the code
> settles down a bit. My submission really does beat the crap out of manually
> editing CFLAGS to add the include directory.

I thought it best to settle the other parts of the CMake changes I've
made then see what would be required afterwards.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to