Kaynağa Gözat

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

check for OpenGL requirements only when GL support has been enforced
Dalton Nell 8 yıl önce
ebeveyn
işleme
ab6a45c971
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5
    5
      CMakeLists.txt

+ 5
- 5
CMakeLists.txt Dosyayı Görüntüle

@@ -106,11 +106,6 @@ set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmakemodules" )
106 106
 find_package( Imlib2    REQUIRED )
107 107
 find_package( X11       REQUIRED )
108 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 109
 # This library is needed only for Ubuntu it seems, some platforms don't even
115 110
 # ship with it. I couldn't find a way to do a test compile to check if librt
116 111
 # was needed, so instead I just didn't mark it as REQUIRED.
@@ -124,6 +119,11 @@ include_directories( "${X11_INCLUDE_DIR}"
124 119
                      "${XEXT_INCLUDE_DIR}" )
125 120
 
126 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 127
 include_directories( "${IMLIB2_INCLUDE_DIR}"
128 128
                      "${XRANDR_INCLUDE_DIR}"
129 129
                      "${OPENGL_INCLUDE_DIR}"