On Fri, Feb 20, 2009 at 2:36 AM, Andrea Tagliasacchi <[email protected]> wrote:
> Thanks Philip,
>
> that worked flawlessly!
>
> I would say that this is the most compact CMake specification to compile
> a Glut/OpenGL application then:
>
> find_package(GLUT)
> find_package(OpenGL)
> INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
> ADD_EXECUTABLE(mesh_view mesh_view.cpp)
> TARGET_LINK_LIBRARIES(mesh_view ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
Indeed that's the idea. But in this particular case you cannot assume
glut and opengl are in the same location. So you should do both
include_directories:
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
2cts
--
Mathieu
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake