Hide lots of values in the advanced list

Fix some bugs
OpenGL always needs X11 on Unix
This commit is contained in:
Ian Scott 2002-09-05 12:00:45 -04:00
parent 12054916d4
commit 079e8469ab
5 changed files with 64 additions and 25 deletions

View File

@ -6,6 +6,8 @@
# FLTK_WRAP_UI, This allows the FLTK_WRAP_UI command to work.
# FLTK_INCLUDE_DIR, where to find include files
# FLTK_LIBRARIES, list of fltk libraries
# FLTK_VERSION_1.0.11 Use this Version
# FLTK_VERSION_1.1 Use this Version
# FLTK_FOUND, Don't use FLTK if false.
@ -14,14 +16,14 @@
# FLTK_GL_LIBRARY, the full path to fltk_gl.lib
# FLTK_FORMS_LIBRARY, the full path to fltk_forms.lib
OPTION(USE_FLTK_VERSION_1.0.11 "Use FLTK version 1.0.11" 1)
OPTION(USE_FLTK_VERSION_1.1 "Use FLTK version 1.1" 0)
OPTION(FLTK_VERSION_1.0.11 "Use FLTK version 1.0.11" 1)
OPTION(FLTK_VERSION_1.1 "Use FLTK version 1.1" 0)
# Exclusion between the two version
IF(USE_FLTK_VERSION_1.0.11)
SET(USE_FLTK_VERSION_1.1 0)
ENDIF(USE_FLTK_VERSION_1.0.11)
IF(FLTK_VERSION_1.0.11)
SET(FLTK_VERSION_1.1 0)
ENDIF(FLTK_VERSION_1.0.11)
FIND_PATH(FLTK_INCLUDE_DIR FL/Fl.h
/usr/local/include
@ -43,14 +45,14 @@ ENDIF(UNIX)
# Make sure that the FLTK include path has been set
# So the FLTK_LIBRARY does not appear the first time
IF(FLTK_INCLUDE_DIR)
IF(USE_FLTK_VERSION_1.0.11)
IF(FLTK_VERSION_1.0.11)
FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
PATHS /usr/lib /usr/local/lib
/usr/local/fltk/lib
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
)
ENDIF(USE_FLTK_VERSION_1.0.11)
IF(USE_FLTK_VERSION_1.1)
ENDIF(FLTK_VERSION_1.0.11)
IF(FLTK_VERSION_1.1)
FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
@ -67,7 +69,7 @@ IF(FLTK_INCLUDE_DIR)
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
)
ENDIF(USE_FLTK_VERSION_1.1)
ENDIF(FLTK_VERSION_1.1)
SET( FLTK_LIBRARIES ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY} ${FLTK_PLATFORM_DEPENDENT_LIBS}
)
@ -99,6 +101,18 @@ IF(FLTK_FLUID_EXECUTABLE)
SET (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR})
SET (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE})
SET (FLTK_LIBRARY ${FLTK_LIBRARIES})
SET (USE_FLTK_VERSION_1.0.11 ${FLTK_VERSION_1.0.11})
SET (USE_FLTK_VERSION_1.1 ${FLTK_VERSION_1.1})
ENDIF(FLTK_LIBRARIES)
ENDIF(FLTK_INCLUDE_DIR)
ENDIF(FLTK_FLUID_EXECUTABLE)
ENDIF(FLTK_FLUID_EXECUTABLE)
MARK_AS_ADVANCED(
FLTK_VERSION_1.0.11
FLTK_VERSION_1.1
FLTK_INCLUDE_DIR
FLTK_BASE_LIBRARY
FLTK_GL_LIBRARY
FLTK_FORMS_LIBRARY
FLTK_IMAGES_LIBRARY
)

View File

@ -19,7 +19,7 @@ IF (WIN32)
)
FIND_LIBRARY( GLUT_glut_LIBRARY glut32
${OPENGL_LIBRARY_PATH}
${OPENGL_LIBRARY_DIR}
/usr/lib
/usr/lib/w32api
/usr/local/lib
@ -35,7 +35,7 @@ IF (WIN32)
FIND_LIBRARY( GLUT_glut_LIBRARY glut
${GLUT_ROOT_PATH}/Release
${OPENGL_LIBRARY_PATH}
${OPENGL_LIBRARY_DIR}
)
ENDIF(CYGWIN)
@ -45,7 +45,7 @@ ELSE (WIN32)
IF (APPLE)
# These values for Apple could probably do with improvement.
FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
${OPENGL_LIBRARY_PATH}
${OPENGL_LIBRARY_DIR}
)
SET(GLUT_glut_LIBRARY "-framework Glut" CACHE STRING "GLUT library for OSX")
ELSE (APPLE)
@ -107,5 +107,8 @@ IF(GLUT_INCLUDE_DIR)
ENDIF(GLUT_INCLUDE_DIR)
MARK_AS_ADVANCED(
GLUT_INCLUDE_PATH
GLUT_INCLUDE_DIR
GLUT_glut_LIBRARY
GLUT_Xmu_LIBRARY
GLUT_Xi_LIBRARY
)

View File

@ -136,6 +136,15 @@ IF (UNIX)
ENDIF(GTK_glib_INCLUDE_PATH)
ENDIF(GTK_gtk_INCLUDE_PATH)
MARK_AS_ADVANCED(
GTK_gtkgl_LIBRARY
GTK_glib_LIBRARY
GTK_gtk_LIBRARY
GTK_gtkgl_INCLUDE_PATH
GTK_glibconfig_INCLUDE_PATH
GTK_glib_INCLUDE_PATH
GTK_gtk_INCLUDE_PATH
)
ENDIF (UNIX)

View File

@ -16,7 +16,6 @@
IF (WIN32)
IF (CYGWIN)
FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
/usr/include
/usr/X11R6/include
@ -56,7 +55,6 @@ IF (WIN32)
ELSE (WIN32)
# The first line below is to make sure that the proper headers
# are used on a Linux machine with the NVidia drivers installed.
# They replace Mesa with NVidia's own library but normally do not
@ -92,6 +90,15 @@ ELSE (WIN32)
/usr/X11R6/lib
)
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't think this is always true.
IF (OPENGL_gl_LIBRARY)
INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
IF (X11_FOUND)
SET (OPENGL_LIBRARIES ${X11_LIBRARIES})
ENDIF (X11_FOUND)
ENDIF (OPENGL_gl_LIBRARY)
FIND_LIBRARY(OPENGL_glu_LIBRARY
NAMES MesaGLU GLU
PATHS /usr/lib
@ -101,17 +108,9 @@ ELSE (WIN32)
/usr/X11R6/lib
)
ENDIF(OPENGL_glu_LIBRARY)
ENDIF(OPENGL_gl_LIBRARY)
ENDIF(OPENGL_INCLUDE_DIR)
ENDIF (WIN32)
SET( OPENGL_FOUND "NO" )
IF(OPENGL_INCLUDE_DIR)
IF(OPENGL_gl_LIBRARY)
@ -140,3 +139,10 @@ IF(OPENGL_INCLUDE_DIR)
SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
ENDIF(OPENGL_INCLUDE_DIR)
MARK_AS_ADVANCED(
OPENGL_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR
OPENGL_glu_LIBRARY
OPENGL_gl_LIBRARY
)

View File

@ -50,4 +50,11 @@ IF (UNIX)
# Deprecated variable fro backwards compatibility with CMake 1.4
SET (X11_LIBRARY ${X11_X11_LIBRARY})
MARK_AS_ADVANCED(
X11_X11_LIBRARY
X11_Xext_LIBRARY
X11_INCLUDE_DIR
)
ENDIF (UNIX)