CMake bug then...?

--- Begin Message ---
Quoting David Cole <[EMAIL PROTECTED]>:

Perhaps something else is setting OPENGL_INCLUDE_DIR prior to hitting
that block...? cc'ing the CMake list to see if anyone else has had
CMake problems with Cygwin/OpenGL...

FIND_PATH results are cached, so you won't know the original source of
OPENGL_INCLUDE_DIR unless you configure from scratch (start with an
empty binary dir)...

Add this to see if it's set before you hit that block:
MESSAGE(STATUS "OPENGL_INCLUDE_DIR='${OPENGL_INCLUDE_DIR}'")

If it's empty, then it sounds like it might be a bug... If it's set
then we look for somebody else setting it before getting here...

OK.  I've cleaned out all CMake cache files using "rm -rf CMake*".

The FindOpenGL.cmake file now looks like this:

IF (WIN32)
  MESSAGE(STATUS "FindOpenGL: WIN32 is defined...")

  IF (CYGWIN)
    MESSAGE(STATUS "FindOpenGL: CYGWIN is defined...")

    MESSAGE(STATUS "OPENGL_INCLUDE_DIR='${OPENGL_INCLUDE_DIR}'")

    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
      /usr/include
      /usr/include/w32api
      /usr/X11R6/include
    )

    MESSAGE(STATUS "OPENGL_INCLUDE_DIR='${OPENGL_INCLUDE_DIR}'")


And here is the output:

-- FindOpenGL: WIN32 is defined...
-- FindOpenGL: CYGWIN is defined...
-- OPENGL_INCLUDE_DIR=''
-- OPENGL_INCLUDE_DIR='/usr/X11R6/include'


I don't get it. Is there a way to have CMake verbosely explain its decision process in the FIND_PATH() statement?

Thanks,
-Steve



--- End Message ---
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to