Browse Source

Merge pull request #47 from vaygr/fix-gl-dep

check for OpenGL requirements only when GL support has been enforced
Dalton Nell 8 years ago
parent
commit
ab6a45c971
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      CMakeLists.txt

+ 5
- 5
CMakeLists.txt View File

106
 find_package( Imlib2    REQUIRED )
106
 find_package( Imlib2    REQUIRED )
107
 find_package( X11       REQUIRED )
107
 find_package( X11       REQUIRED )
108
 find_package( XExt      REQUIRED )
108
 find_package( XExt      REQUIRED )
109
-find_package( OpenGL    REQUIRED )
110
-find_package( GLX       REQUIRED )
111
-find_package( XRender   REQUIRED )
112
-find_package( XRandr    REQUIRED )
113
-find_package( GLEW      REQUIRED )
114
 # This library is needed only for Ubuntu it seems, some platforms don't even
109
 # This library is needed only for Ubuntu it seems, some platforms don't even
115
 # ship with it. I couldn't find a way to do a test compile to check if librt
110
 # ship with it. I couldn't find a way to do a test compile to check if librt
116
 # was needed, so instead I just didn't mark it as REQUIRED.
111
 # was needed, so instead I just didn't mark it as REQUIRED.
124
                      "${XEXT_INCLUDE_DIR}" )
119
                      "${XEXT_INCLUDE_DIR}" )
125
 
120
 
126
 if ( CMAKE_OPENGL_SUPPORT )
121
 if ( CMAKE_OPENGL_SUPPORT )
122
+find_package( OpenGL    REQUIRED )
123
+find_package( GLX       REQUIRED )
124
+find_package( XRender   REQUIRED )
125
+find_package( XRandr    REQUIRED )
126
+find_package( GLEW      REQUIRED )
127
 include_directories( "${IMLIB2_INCLUDE_DIR}"
127
 include_directories( "${IMLIB2_INCLUDE_DIR}"
128
                      "${XRANDR_INCLUDE_DIR}"
128
                      "${XRANDR_INCLUDE_DIR}"
129
                      "${OPENGL_INCLUDE_DIR}"
129
                      "${OPENGL_INCLUDE_DIR}"