[osg-users] How do I get osgviewer on Cygwin to compile with -lX11 -lXrandr

2011-07-06 Thread Brian Keener
I tried building OSG on Cygwin 1.7 and I first tried to do it without X 
but it seems that osgviewer seems to insist on X11 and that WIN32 
option has been removed (or is that what you get if you leave it at 
none).  

At any rate I finally accepted the defaults (except adding -DNOMINMAX 
and was bale to get osg to build but to get edit several link.txt files 
during the build.  I ran Cmake and did the configure and generate and 
then each time it bombed using something involving osgviewer then I 
would go edit the appropriate link.txt file and add -lX11 -lXrandr to 
the executable line in that file and then execute the file.  This would 
complete the link and then when I started my make again it would move 
past that build and continue.  I did this for each link failure as 
follow:

In the build directory for OSG (my build root is /usr/develop/obj/osg):
/usr/develop/obj/osg/src/osgViewer

I edited the file:

vi ./CMakeFiles/osgViewer.dir/link.txt

and added the -lX11 -lXrandr to the line in link.txt.  I then executed 
the link.txt file as in :

./CMakeFiles/osgViewer.dir/link.txt

and the file built - so that was all it needed for osgViewer but...

I then would have to do this other parts of the build (osgArchive, 
osgConv and so on ) to get it to finish.

My question(s) is/are where do I find the logic that dictates during 
the Cmake configure what libs to include and in what files will I find 
this when the generate finishes.  I would like to tweak this so the 
cmake configure and generate for cygwin was smart enough add the X11 
and Xrandr libs.  

I would also like to know (if any knows) what in general should be the 
setting to get osgviewer to build without X11 on Cygwin and just use 
the opengl and no X.

thanks

bk


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do I get osgviewer on Cygwin to compile with -lX11 -lXrandr

2011-07-06 Thread Alberto Luaces
Hi Brian,

Brian Keener writes:

[...]

 My question(s) is/are where do I find the logic that dictates during 
 the Cmake configure what libs to include and in what files will I find 
 this when the generate finishes.  I would like to tweak this so the 
 cmake configure and generate for cygwin was smart enough add the X11 
 and Xrandr libs.  


It should be smart enough to do it by itself; however I guess that you
can manually configure it by setting X11_X11_LIB and X11_Xrandr_LIB
parameters of CMake. These take the path of the libraries, as in
/usr/lib/libXrandr.so. As a last resort, you can set the parameters
CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS to include -lX11 -lXrandr.


 I would also like to know (if any knows) what in general should be the
 setting to get osgviewer to build without X11 on Cygwin and just use 
 the opengl and no X.

It's been some time since I don't build OSG in Cygwin, but using the
Win32 API on Cygwin applications should be more and more difficult every
day. Coherently, the CMake port for Cygwin is deprecating the WIN32
definition, since it aims to be a POSIX platform. However, I have seen
that X for Cygwin has now experimental support for hardware
acceleration.

Regards,

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How do I get osgviewer on Cygwin to compile with -lX11 -lXrandr

2011-07-06 Thread brianklistacct

 Alberto Luaces alua...@udc.es wrote: 
 It should be smart enough to do it by itself; however I guess that you
 can manually configure it by setting X11_X11_LIB and X11_Xrandr_LIB
 parameters of CMake. These take the path of the libraries, as in
 /usr/lib/libXrandr.so. As a last resort, you can set the parameters
 CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS to include -lX11 -lXrandr.

Strange thing is - the configure populates those - it apparently finds them 
during configure but then either the generate or something when I do the build 
doesn't because when i do the build the -lX11 and -lXrandr isn't included (at 
least according to the link.txt files I look at.

thanks.

bk
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org