ソースを参照

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

check for OpenGL requirements only when GL support has been enforced
Dalton Nell 8 年 前
コミット
ab6a45c971
共有1 個のファイルを変更した5 個の追加5 個の削除を含む
  1. 5
    5
      CMakeLists.txt

+ 5
- 5
CMakeLists.txt ファイルの表示

@@ -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}"