Great!

I think this is a very good idea. Many members of this forum seem to use VS
2005 Express and its likely they don't have MFC installed. Myself included
;-)

Cheers,
Wojtek Lewandowski


----- Original Message ----- From: "Jean-Sébastien Guay" <[EMAIL PROTECTED]>
To: <osg-users@openscenegraph.net>
Sent: Friday, June 15, 2007 5:48 AM
Subject: Re: [osg-users] osgviewerMFC and Visual Studio Express


Replying to myself again, ah the joys of being in a different time
zone than the principal developer(s)...

So the options seem to be:
[...]
2. Ask the CMake developers to add a check for Visual Studio Express in
the FindMFC.cmake module. How they would do it, I don't know, neither
do I know how much time that could take.
[...]

Instead of this, I hacked my own FindVCExpress module. This way, the
test for including the osgviewerMFC example becomes:

FIND_PACKAGE(MFC) # includes a test for WIN32.
FIND_PACKAGE(VCExpress)
IF (MFC_FOUND AND NOT MSVC80EXPRESS)
    ADD_SUBDIRECTORY(osgviewerMFC)
ENDIF (MFC_FOUND AND NOT MSVC80EXPRESS)

Tested on a machine which has only the Express Edition, and another
that has only the Professional Edition. Works as expected in both cases.

One problem would be if both are present, it will not include the MFC
example. The workaround is not trivial (look for all other VC++
versions, and if found, keep the MFC example even if Express is also
installed). Even then, it's not perfect, because if the generated
project files are used in the Express version... So I think not
checking that fringe case is good enough for now.

Or maybe we should add an advanced option to force inclusion of the
MFC example even if the tests fail?

Comments?

I have attached the modified examples/CMakeLists.txt and the
FindVCExpress.cmake module.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay     [EMAIL PROTECTED]
                        http://whitestar02.webhop.org/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




--------------------------------------------------------------------------------


_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to