[CMake] Support for frameworks in OS X?
Mike Jackson
imikejackson at gmail.com
Wed Apr 16 22:01:08 EDT 2008
Try using "FindPackage(OpenGL)"
Then you can use:
include_Directories( ${OPENGL_INCLUDE_DIR} )
ADD_EXECUTABLE (.. )
Target_Link_Libraries(MyOpenGLApp ${OPENGL_LIBRARIES} )
Not having tried any of that.. but that should be pretty close..
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Apr 16, 2008, at 3:25 PM, Convey Christian J NPRI wrote:
> I guess this is as much an OS X question as a CMake question...
>
> I'm new to OS X programming, but I'm porting a CMake-based Linux
> project to also work on OS X. It generally builds fine, except for
> the project's OpenGL programs. The compiler isn't finding gl.h,
> despite there being several installed frameworks that have gl.h.
>
> Does anyone know, when using CMake on OS X, what one does to tell
> tell the compiler which framework(s) to use when searching for
> header files?
>
> For example, am I supposed to just manually call
> INCLUDE_DIRECTORIES, such as:
> INCLUDE_DIRECTORIES(/Developer/SDKs/MacOSX10.4u.sdk/....../A/
> Headers)
>
> Or is there something more along the lines of:
> SET(CMAKE_CXX_FLAGS "-g -framework OpenGL")
> or
> SET(OSX_FRAMEWORKS AGL OpenGL)
> that lets the compiler know in which directories to look for files
> like gl.h?
>
> Thanks,
> Christian
>
> Christian Convey
> Scientist, Naval Undersea Warfare Centers
> Newport, RI
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list