Luigi Calori wrote:
Sorry for the delay in response, but today I' ve been almost ot of office.

E. Wing wrote:


For example, a GIF library may not be installed on the system. We need
to know not to build the osgdb gif plugin.

almost done, the problem is wetehe ro notify the user or not: I' m not so proficient in CMake to know how to clean build a configurationuser interface to both let user select the plugins to build and be notified to provide a needed dependency

Use MESSAGE(STATUS "blah") if you just want to see a status report on the command line as things are done. Use MESSAGE("blah") if you want to pop up a dialog box, but you don't want it to be an error. Use MESSAGE(SEND_ERROR "blah") if you want a dialog box + a build error, but not for the error to be fatal. Use MESSAGE(FATAL_ERROR "blah") if you want a dialog box + terminate all further processing.

An example:

# check for windows.h
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
IF(HAVE_WINDOWS_H)

 # NOTE: Don't assume we're on Windows.  We could be cross-compiling.
 CHECK_SYMBOL_EXISTS(LoadLibrary windows.h HAVE_LOADLIBRARY)
 CHECK_SYMBOL_EXISTS(GetProcAddress windows.h HAVE_GETPROCADDRESS)

 CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H)
 IF (NOT HAVE_WINSOCK2_H)
   MESSAGE("You are missing winsock2.h.
     Correct this if you want full network functionality.")
 ENDIF(NOT HAVE_WINSOCK2_H)
 # ws2tcpip.h needs winsock2.h for various definitions
 SET(WS2FILES winsock2.h ws2tcpip.h)
 CHECK_INCLUDE_FILES("${WS2FILES}" HAVE_WS2TCPIP_H)
 IF (NOT HAVE_WS2TCPIP_H)
   MESSAGE("You are missing ws2tcpip.h.
     Correct this if you want full network functionality.")
 ENDIF(NOT HAVE_WS2TCPIP_H)

ENDIF(HAVE_WINDOWS_H)


Cheers,
Brandon Van Every


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to