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...

HTH,
David


Steve Robbins wrote:

Quoting David Cole <[EMAIL PROTECTED]>:

I could be wrong, but I'm pretty sure WIN32 is *always* defined on
Windows CMake, even under cygwin. You are using the cygwin cmake,
right? ("which cmake" from your cygwin prompt should report
"/usr/bin/cmake" as opposed to the one installed in program files...)


Yes, it's /usr/bin/cmake, and yes (using your "print it" debugging technique) I verified that both WIN32 and CYGWIN are defined.

So scratch my theory...

According to the message statements I put into FindOpenGL.cmake, this bit is indeed being executed

IF (WIN32)
  IF (CYGWIN)

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

I put MESSAGE(STATUS "FindOpenGL: include dir is ${OPENGL_INCLUDE_DIR}")
right after this and it says /usr/X11R6/include was found. However, I do have /usr/include/w32api/GL/gl.h

[EMAIL PROTECTED] -l /usr/include/w32api/GL/gl.h
-rwxr-x---+ 1 srobbins Users 79874 Apr 14 07:56 /usr/include/w32api/GL/gl.h

so I have no clue why FIND_PATH() doesn't pick it up.

Yours in puzzlement,
-Steve


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

Reply via email to