FindGLUT.cmake from cmake 3.8.0 looks in the ${GLUT_ROOT_PATH}/Release folder (also in ${OPENGL_LIBRARY_DIR}) for any of the glut, glut32 and freeglut libraries. However, FreeGLUT 3.0.0 cmake files specifies to install library files into a "lib" folder, which makes it impossible for the find_package(GLUT) to work with freeGLUT as is. The magic is broken...
That's not a bug. $PREFIX/lib is the standard place to put libraries. If cmake doesn't look in the standard directories, file a bug to the cmake project.
Like you say, but cmake works for GLUT this way - since many versions ago - (and I guess it does for Linux convenience more than any other platforms)... I don't care much who the fault is. The fact remains, find_package does NOT work with freeGLUT, by design! It would be more convenient to have freeGLUT understanding this fact so it could work with MANY versions of cmake. Anyway... at least, it's now documented!
Thanks!
Hi Sam,
While i definitely agree with John in principle, i detect in your message that where FG 3.0 is installed is different from where 2.8 and such were installed? If that is the case, such a backward incompatible change possibly should not have occured. If so, could you bring it up on the freeglut developer list, so we can discuss it there?
Thanks and all the best,
Dee
Do we really want to duplicate the directory structure of visual studio projects, just because a 3rd party "find glut" script was written back when we used to maintain visual studio projects on windows? Surely it's much simpler for the 3rd party script to be updated to reflect the new freeglut structure. I don't feel strongly one way or the other, and since there is any doubt about what's the best course of action I'm reopening the bug until the question is resolved in the mailing list.
When building the visual studio project generated by cmake, isn't a Release directory being created anyway? Is it possible that the OP just did a debug build, or a release build in some other out-of-source directory? If that's the case, we definitely don't want to disallow out-of-source builds, or force in-source build output when doing out-of-source builds. Maybe just provide a note in the readme file saying "if you wish to be compatible with find_glut or whatever, don't use a separate build directory"?
Last edit: John Tsiombikas 2017-04-23