MantisBT - CMake
View Issue Details
0006057CMakeModulespublic2007-11-16 09:502016-06-10 14:30
Benjamin Reed 
Kitware Robot 
normalfeaturealways
closedmoved 
 
 
0006057: Patch to make it easier to ignore the OpenGL framework on Mac OS X
Attached is a small patch to allow setting a flag on the cmake command line to ignore the OpenGL framework and use GL from X11 instead.
When buildign KDE against Qt/X11 on Mac OS X, it is desireable to use X11's libGL, rather than the system framework. Instead of having to muck with overriding the cmake variables, you can instead just build with "-DCMAKE_IGNORE_OPENGL_FRAMEWORK:BOOL=true" on the cmake command-line.
No tags attached.
related to 0011631closed David Cole Option for X11 OpenGL on Apple 
patch findopengl-noframework.patch (1,500) 2007-11-16 09:50
https://public.kitware.com/Bug/file/1231/findopengl-noframework.patch
Issue History
2007-11-16 09:50Benjamin ReedNew Issue
2007-11-16 09:50Benjamin ReedFile Added: findopengl-noframework.patch
2007-11-19 10:04Alex NeundorfCategoryCCMake => Modules
2007-12-14 16:51Bill HoffmanStatusnew => assigned
2007-12-14 16:51Bill HoffmanAssigned To => Alex Neundorf
2007-12-15 18:12Alex NeundorfNote Added: 0009936
2008-01-10 16:30Alex NeundorfNote Added: 0010120
2011-01-18 15:08Alex NeundorfRelationship addedrelated to 0011631
2011-01-18 15:25Benjamin ReedNote Added: 0024893
2012-08-13 12:48Alex NeundorfAssigned ToAlex Neundorf =>
2012-08-13 12:48Alex NeundorfStatusassigned => backlog
2016-06-10 14:27Kitware RobotNote Added: 0041403
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:27Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0009936)
Alex Neundorf   
2007-12-15 18:12   
Hmm, the patch is obvious and shouldn't be able to break anything.

That said, I can't test that (I don't have a Mac) and I am not sure if we want to introduce variable for such purposes.
A simple way to improve this would be just to use OPENGL_IGNORE_FRAMEWORK as name for the variable:

set(OPENGL_IGNORE_FRAMEWORK TRUE)
find_package(OpenGL)

Could the COMPONENTS argument be used ?
find_PACKAGE(OpenGL COMPONENTS X11OpenGlLibs)

which would then disable searching for frameworks ?

Can you have a look at that ?

Alex
(0010120)
Alex Neundorf   
2008-01-10 16:30   
I really think the patch is too specific.

Does the following work too ?
set(CMAKE_FIND_FRAMEWORK NEVER)
find_package(OpenGL)
set(CMAKE_FIND_FRAMEWORK FIRST)

Or what about a new argument for the FIND_XXX() commands NO_FRAMEWORK_PATH ?

Alex
(0024893)
Benjamin Reed   
2011-01-18 15:25   
Sorry, I somehow missed the last time you commented on this... I'll answer in reverse. =)

> Does the following work too ?
> set(CMAKE_FIND_FRAMEWORK NEVER)
> find_package(OpenGL)
> set(CMAKE_FIND_FRAMEWORK FIRST)

I am nowhere near having a KDE build environment set up at the moment, so I can't test this, but this looks like something that would require changing every place in KDE where we find_package(OpenGL), which would be... awful. Especially since when building against Qt/Mac (as opposed to Qt/X11) we would *want* it to find the framework version, so then it would have to be parameterized.

as for this:

> set(OPENGL_IGNORE_FRAMEWORK TRUE)
> find_package(OpenGL)

That would seem reasonable. I'd be able to set it on the command-line too in my build scripts if I wanted to globally override things.

and:

> Could the COMPONENTS argument be used ?
> find_PACKAGE(OpenGL COMPONENTS X11OpenGlLibs)

...I guess has the same problem ias your more recent comment, we'd have to change every CMakeLists.txt file rather than having the option of choosing a default behavior on the command-line. (Unless the command-line would override both of those sets?)
(0041403)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.