Changeset 801


Ignore:
Timestamp:
Aug 2, 2011, 6:09:23 PM (8 years ago)
Author:
sam
Message:

build: make libglew detection work on MinGW.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build-mingw

    r797 r801  
    1515
    1616# Glew include path
    17 CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/glew-1.6.0/include"
     17CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/glew-1.6.0/include -DGLEW_STATIC"
    1818
    1919# GTK include path
     
    4848
    4949# Help our build scripts a bit here
    50 GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lgdi32"
     50GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lglew32 -lgdi32"
    5151GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0"
    5252GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0"
  • trunk/configure.ac

    r797 r801  
    8282 [ac_cv_my_have_gl="yes"
    8383  AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
    84   GL_CFLAGS="${GLES2_CFLAGS}"
    85   GL_LIBS="${GLES2_LIBS}"],
     84  GL_CFLAGS="${GL_CFLAGS} ${GLES2_CFLAGS}"
     85  GL_LIBS="${GL_LIBS} ${GLES2_LIBS}"],
    8686 [:])
    8787AC_CHECK_LIB(GL, glLoadIdentity,
     
    107107dnl Use Glew?
    108108ac_cv_my_have_glew="no"
    109 PKG_CHECK_MODULES(GLEW, glew, [ac_cv_my_have_glew="yes"], [:])
     109PKG_CHECK_MODULES(GLEW, glew,
     110 [ac_cv_my_have_glew="yes"
     111  GL_CFLAGS="${GLEW_CFLAGS} ${GL_CFLAGS}"
     112  GL_LIBS="${GLEW_LIBS} ${GL_LIBS}"],
     113 [:])
    110114AC_CHECK_HEADER(GL/glew.h,
    111  [LIBS_save="$LIBS"
    112   LIBS="$LIBS -lglew32"
     115 [LIBS_save="${LIBS}"
     116  LIBS="${LIBS} -lglew32 ${GL_LIBS}"
    113117  AC_MSG_CHECKING(for glewInit in -lglew32)
    114   AC_TRY_LINK([#include <GL/glew.h>],
     118  AC_TRY_LINK(
     119   [#include <GL/glew.h>],
    115120   [glewInit();],
    116121   [ac_cv_my_have_glew="yes"
    117122    AC_MSG_RESULT(yes)],
    118123   [AC_MSG_RESULT(no)])
    119   LIBS="$LIBS_save"])
     124  GL_LIBS="-lglew32 ${GL_LIBS}"
     125  LIBS="${LIBS_save}"])
    120126if test "${ac_cv_my_have_glew}" != "no"; then
    121127  AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
     
    124130AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no")
    125131
    126 dnl Poor man's GL feature detection.
     132dnl Poor man's GL feature detection if all else failed.
    127133save_LIBS="${LIBS}"
    128134LIBS="${LIBS} ${GL_LIBS} ${GLES2_LIBS}"
     
    215221dnl How to use the Lol Engine inside this tree
    216222LOL_CFLAGS="$LOL_CFLAGS -I \$(top_srcdir)/src"
    217 LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $EGL_CFLAGS $GLEW_CFLAGS $LIBPNG_CFLAGS"
    218 LOL_LIBS="$LOL_LIBS $SDL_LIBS $EGL_LIBS $GLEW_LIBS $LIBPNG_LIBS"
     223LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
     224LOL_LIBS="$LOL_LIBS $SDL_LIBS $EGL_LIBS $LIBPNG_LIBS"
    219225
    220226AC_SUBST(MATH_LIBS)
Note: See TracChangeset for help on using the changeset viewer.