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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to