|
|
@@ -64,25 +64,23 @@ ELSE (WIN32)
|
|
|
|
|
|
ENDIF (WIN32)
|
|
|
|
|
|
-SET( GLUT_FOUND "NO" )
|
|
|
-IF(GLUT_INCLUDE_DIR)
|
|
|
- IF(GLUT_glut_LIBRARY)
|
|
|
- # Is -lXi and -lXmu required on all platforms that have it?
|
|
|
- # If not, we need some way to figure out what platform we are on.
|
|
|
- SET( GLUT_LIBRARIES
|
|
|
- ${GLUT_glut_LIBRARY}
|
|
|
- ${GLUT_Xmu_LIBRARY}
|
|
|
- ${GLUT_Xi_LIBRARY}
|
|
|
- ${GLUT_cocoa_LIBRARY}
|
|
|
- )
|
|
|
- SET( GLUT_FOUND "YES" )
|
|
|
-
|
|
|
- #The following deprecated settings are for backwards compatibility with CMake1.4
|
|
|
- SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
|
|
|
- SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
|
|
|
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
|
|
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
|
|
|
+
|
|
|
+IF (GLUT_FOUND)
|
|
|
+ # Is -lXi and -lXmu required on all platforms that have it?
|
|
|
+ # If not, we need some way to figure out what platform we are on.
|
|
|
+ SET( GLUT_LIBRARIES
|
|
|
+ ${GLUT_glut_LIBRARY}
|
|
|
+ ${GLUT_Xmu_LIBRARY}
|
|
|
+ ${GLUT_Xi_LIBRARY}
|
|
|
+ ${GLUT_cocoa_LIBRARY}
|
|
|
+ )
|
|
|
|
|
|
- ENDIF(GLUT_glut_LIBRARY)
|
|
|
-ENDIF(GLUT_INCLUDE_DIR)
|
|
|
+ #The following deprecated settings are for backwards compatibility with CMake1.4
|
|
|
+ SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
|
|
|
+ SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
|
|
|
+ENDIF(GLUT_FOUND)
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
GLUT_INCLUDE_DIR
|