The sequence IF( OPENGL_glu_LIBRARY ) MESSAGE( "OKAY" ) ENDIF( OPENGL_glu_LIBRARY ) MESSAGE( "NOT OKAY" ) ENDIF( OPENGL_glu_LIBRARY ) will execute both message statements when the variable is set, and only the second when the variable is not set. (The error: the middle line should be ELSE, not ENDIF.) Amitha.