Indexer does not recognise Macos frameworks correctly in a project created by CMake [message #1754491] |
Sat, 18 February 2017 17:43 |
Kustaa Nyholm Messages: 5 Registered: January 2017 |
Junior Member |
|
|
I have a project (FreeCAD) that I'm developing under Eclipse (Neon (4.6)).
This is a complex build, managed with CMake.
The Eclipse project is generated with CMake like this:
cmake -G "Eclipse CDT4 - Unix Makefiles" ../FreeCAD/
and then imported to Eclipse as existing project.
The project builds fine and in Eclipse things work, except that OpenGL imports like this are not recognised by the indexer:
After researching this I think the problem is that in MacOs Frameworks the headers for a framework are in a flat directory (as opposed to hierarchical organisation as they should be) called "Headers" (like this "../OpenGL.framework/Versions/A/Headers/gl.h") and by some magic the compiler is able to find the files even though the include has that prefix 'OpenGL' in there.
There is an Eclipse bug about this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=69529
which is fixed, so it should work.
And indeed if I create a C++ CDT Managed project with 'MacOSX GCC" toolchain then the indexer picks up the "gl.h" correctly despite of the prefix.
But I have not figured out how tweak the CMake generated project to understand framework includes correctly.
If I could change the tool chain of the project, that might do the trick but I have not found a way to do that.
Interestingly I do have an Eclipse project created by CMake where this works but I don't know how I managed to create that.
Help would be highly appreciated...
|
|
|
Powered by
FUDForum. Page generated in 0.01430 seconds