summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Scott <ian.m.scott@stud.man.ac.uk>2002-09-05 16:00:45 (GMT)
committerIan Scott <ian.m.scott@stud.man.ac.uk>2002-09-05 16:00:45 (GMT)
commit079e8469abd4a2b404fd460ff41012e8d8b6fd1d (patch)
treea920d611d876599e8c04f4a301b5bcf927d6909b
parent12054916d491d8424b58a87c4ff69679a7f4476d (diff)
downloadCMake-079e8469abd4a2b404fd460ff41012e8d8b6fd1d.zip
CMake-079e8469abd4a2b404fd460ff41012e8d8b6fd1d.tar.gz
CMake-079e8469abd4a2b404fd460ff41012e8d8b6fd1d.tar.bz2
Hide lots of values in the advanced list
Fix some bugs OpenGL always needs X11 on Unix
-rw-r--r--Modules/FindFLTK.cmake34
-rw-r--r--Modules/FindGLUT.cmake11
-rw-r--r--Modules/FindGTK.cmake11
-rw-r--r--Modules/FindOpenGL.cmake26
-rw-r--r--Modules/FindX11.cmake7
5 files changed, 64 insertions, 25 deletions
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index d805346..adc5853 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -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) \ No newline at end of file
+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
+)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 2194347..68051fa 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -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
) \ No newline at end of file
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake
index 846cd99..9e483a9 100644
--- a/Modules/FindGTK.cmake
+++ b/Modules/FindGTK.cmake
@@ -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)
+
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index b2f46dd..aeaf519 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -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
+)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 355a021..c101a06 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -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)