[CMake] CoreGraphics framework
Michael Wild
themiwi at gmail.com
Tue Feb 2 07:47:52 EST 2010
On 2. Feb, 2010, at 12:05 , Martin Guillon wrote:
> Hi,
>
> I am trying to include CGEvent.h in my cmake project. So I need to include CoreGraphics framework.
>
> So I added
> FIND_LIBRARY(APP_SERVICES ApplicationServices "/")
> FIND_LIBRARY(COREGRAPHICS CoreGraphics "/") in my cmakelists
> But the CoreGraphics Framework is in the Application Services Framework so I don't see how to include it :s
>
> I tried #include <ApplicationServices/CoreGraphics/CGEvent.h> or #include <CoreGraphics/CGEvent.h>
>
> But nothing works...
>
> Any help ?
>
> THanks
According to http://developer.apple.com/Mac/library/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html it is not possible to include header files from sub-frameworks. The only way is to include ApplicationServices/ApplicationServices.h
And your find_library call should not need to specify a path:
find_library(APP_SERVICES ApplicationServices)
The way you call find_library is actually invalid.
HTH
Michael
More information about the CMake
mailing list