Hi Paul,

On 24 April 2014 23:32, Paul Martz <[email protected]> wrote:
> Hi Robert -- The 'OpenGL' header was still getting generated into the source
> tree, so I tracked it down and have a fix for you. See attached top-level
> CMakeLists.txt. Thanks.
>
> At this point, everything seems to be building as expected with
> OPENGL_PROFILE=GLCORE.

Ahhh... I double checked this code and thought it was fine as it was
consistent with the configuration block for the Version file that has
just above it, however, the Version header was being placed in the
source directory rather than the build directory.  The Config file is
however placed in the build directory and is the one I should have
copied when generating the OpenGL.in configuration code.  I have
merged your fix and checked it into svn/trunk.

This little copy and paste bug does rise the question about where the
Version file should be placed.  It's autogenerated like the
Config/OpenGL headers by isn't a configuration file so won't change
depending upon build options selected.  I think it's probably OK left
where it is.

To help clarify what is doing what I've moved the Version
configuration step to a separate comments block below the
Config/OpenGL header configuration block and added comments to explain
each blocks purpose.

--

Now things are compiling OK for you, could you let me know which bits
if any of the original post you now want merged.  I might be best to
provide a new submission post formalize what is now required so I
don't make any mistakes during any required the merge.

Cheers,
Robert.


>
>
> On Thu, Apr 24, 2014 at 1:27 AM, Robert Osfield <[email protected]>
> wrote:
>>
>> 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
>
>
>
>
> --
>    -Paul
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to