View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013050CMakeModulespublic2012-03-18 04:412012-09-03 16:00
ReporterDavide Barbieri 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformX86OSWindowsOS Version7
Product VersionCMake 2.8.7 
Target VersionFixed in Version 
Summary0013050: FindOpenGL not working on Cygwin
Descriptionfind_package(OpenGL) is not working on cygwin with cmake 2.8.7.

Probably, because in the newer versions of cmake you don't define
WIN32 no more.
But you still use it for FindOpenGL.cmake:

IF (WIN32)
  IF (CYGWIN)
    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h )
    FIND_LIBRARY(OPENGL_gl_LIBRARY opengl32 )
    FIND_LIBRARY(OPENGL_glu_LIBRARY glu32 )
  ELSE (CYGWIN)
...

using directly the find_library macro, it works..
Steps To Reproducefind_package(OpenGL)
TagsNo tags attached.
Attached Files

 Relationships
related to 0010122closedBrad King Patches for Cygwin 

  Notes
(0028934)
Brad King (manager)
2012-03-19 09:21

This commit:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85c0a69a [^]

removed the definition of WIN32 for issue 0010122.
(0028935)
Brad King (manager)
2012-03-19 09:23

The FindOpenGL code path in question is left from when Cygwin packages could use the Windows GL. Cygwin now always builds packages against the X11 GL libraries. Install that package and the else(WIN32)/else(APPLE) block will find them.
(0028940)
Davide Barbieri (reporter)
2012-03-19 20:58

Ok, in fact I was using:
/usr/lib/w32api/libopengl32.a
(0028941)
Brad King (manager)
2012-03-20 08:40

Cygwin upstream has moved toward X11-only (the Tcl/Tk package switched recently IIUC). If you *do* want to use the Windows one then you can set CMAKE_LEGACY_CYGWIN_WIN32 to tell CMake to treat Cygwin like Windows which will define WIN32 and take the old code path in FindOpenGL. Otherwise just pass -DOPENGL_gl_LIBRARY=/usr/lib/w32api/libopengl32.a and other relevant options to tell CMake what GL to use.
(0030838)
David Cole (manager)
2012-09-03 16:00

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-03-18 04:41 Davide Barbieri New Issue
2012-03-19 09:21 Brad King Relationship added related to 0010122
2012-03-19 09:21 Brad King Note Added: 0028934
2012-03-19 09:23 Brad King Note Added: 0028935
2012-03-19 20:30 Davide Barbieri Note Added: 0028939
2012-03-19 20:31 Davide Barbieri Note Deleted: 0028939
2012-03-19 20:58 Davide Barbieri Note Added: 0028940
2012-03-20 08:40 Brad King Note Added: 0028941
2012-03-20 08:40 Brad King Status new => resolved
2012-03-20 08:40 Brad King Resolution open => no change required
2012-03-20 08:40 Brad King Assigned To => Brad King
2012-09-03 16:00 David Cole Note Added: 0030838
2012-09-03 16:00 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team