[cmake-developers] [PATCH 4/5] FindGLUT.cmake: Add imported targets and documentation
Brad King
brad.king at kitware.com
Tue Jun 24 08:32:28 EDT 2014
On 06/10/2014 05:55 AM, Philipp Möller wrote:
> The APPLE part works, but definitely could be improved upon.
[snip]
> + if(APPLE)
> + # Using the hardcoded paths is certainly not the best thing to
> + # do, but it is done the include path already.
> + set_target_properties(GLUT::GLUT PROPERTIES
> + IMPORTED_LOCATION "/System/Library/Frameworks/GLUT.framework/GLUT")
> + if(NOT TARGET GLUT::Cocoa)
> + add_library(GLUT::Cocoa UNKNOWN IMPORTED)
> + set_target_properties(GLUT::Cocoa PROPERTIES
> + IMPORTED_LOCATION "/System/Library/Frameworks/Cocoa.framework/Cocoa")
> + endif()
> + set_target_properties(GLUT::GLUT PROPERTIES
> + INTERFACE_LINK_LIBRARIES GLUT::Cocoa)
> + else()
The path to the framework is hard-coded for the include path only
as a possible search location, not as a result. The above code
hard-codes it as a result. FindGLUT is one of the only modules
left that hard-codes "-framework XYZ" as a result on OS X instead
of allowing find_library to locate the framework. That needs to
be fixed first, and then the framework path can be handled here
the same way as it is in FindOpenGL.
Thanks,
-Brad
More information about the cmake-developers
mailing list