~compiz-team/compiz/compiz.packaging.gles

« back to all changes in this revision

Viewing changes to cmake/plugin_extensions/CompizOpenGLFixups.cmake

  • Committer: Sam Spilsbury
  • Date: 2012-07-11 01:34:55 UTC
  • mfrom: (3273.1.2 compiz.packaging.gles)
  • Revision ID: sam.spilsbury@canonical.com-20120711013455-489y3e43oldfe395
[ Sam Spilsbury ]
Update patches for GLES2 support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# modify pkg-config libs for opengl based on if we found GLES or not
 
3
if (${COMPIZ_CURRENT_PLUGIN} STREQUAL "opengl")
 
4
    if (USE_GLES)
 
5
        set (PKGCONFIG_LIBS "-lGLESv2 -lEGL")
 
6
    else (USE_GLES)
 
7
        set (PKGCONFIG_LIBS "-lGL")
 
8
    endif (USE_GLES)
 
9
endif (${COMPIZ_CURRENT_PLUGIN} STREQUAL "opengl")
 
10
 
 
11
# if plugin is using opengl plugin check for GLES library and set correct define
 
12
if (NOT "${${_PLUGIN}_PLUGINDEPS}" STREQUAL "")
 
13
    string (REGEX MATCH "opengl" opengl_found ${${_PLUGIN}_PLUGINDEPS})
 
14
 
 
15
    if (opengl_found STREQUAL "opengl")
 
16
        if (USE_GLES)
 
17
            set (${_PLUGIN}_CFLAGSADD ${${_PLUGIN}_CFLAGSADD} " -DUSE_GLES")
 
18
            string (REPLACE ";" " " ${_PLUGIN}_CFLAGSADD ${${_PLUGIN}_CFLAGSADD})
 
19
        endif (USE_GLES)
 
20
    endif (opengl_found STREQUAL "opengl")
 
21
endif (NOT "${${_PLUGIN}_PLUGINDEPS}" STREQUAL "")
 
22