Skip to content

Commit

Permalink
BUILD: Add dependency on OGRE (>= 1.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Mar 20, 2014
1 parent 15aa905 commit 83c94d1
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ INSTALL
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/m4/pkg.m4
/build-aux/ar-lib
/build-aux/compile
/build-aux/config.guess
Expand Down
2 changes: 2 additions & 0 deletions BUILDDEP
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Build-time library dependencies

- OpenGL (>= 2.1)
- SDL2 (>= 2.0.0)
- OGRE (>= 1.9)
- OGRE-Overlay
- FreeType 2 (>= 2.4.0 (libtool number >= 11.0.5))

- OpenAL Soft (>= 1.12)
Expand Down
8 changes: 6 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ AUTOMAKE_OPTIONS = subdir-objects

EMPTY =

OGRE_DEFINE = -DOGRE_PLUGINDIR=\"$(OGRE_PLUGINDIR)\"

LIBSF_C_CXX = $(XOREOS_CFLAGS) $(ZLIB_CFLAGS) \
$(SDL2_CFLAGS) $(GL_CFLAGS) $(FT2_CFLAGS) $(XVID_CFLAGS) \
$(AL_CFLAGS) $(FAAD_CFLAGS) $(MAD_CFLAGS) $(OGG_CFLAGS) \
$(VORBIS_CFLAGS)
LIBSF_CXX = $(BOOST_CPPFLAGS)
LIBSF_CXX = $(OGRE_CFLAGS) $(OGRE_DEFINE) $(OGREOVERLAY_CFLAGS) \
$(BOOST_CPPFLAGS)

LIBSL_BOOST = $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
$(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
$(BOOST_REGEX_LDFLAGS) $(BOOST_REGEX_LIBS) \
$(BOOST_ATOMIC_LDFLAGS) $(BOOST_ATOMIC_LIBS)
LIBSL = $(XOREOS_LIBS) $(ZLIB_LIBS) \
$(SDL2_LIBS) $(GL_LIBS) $(FT2_LIBS) $(XVID_LIBS) \
$(SDL2_LIBS) $(GL_LIBS) $(OGRE_LIBS) $(OGREOVERLAY_LIBS) \
$(FT2_LIBS) $(XVID_LIBS) \
$(AL_LIBS) $(FAAD_LIBS) $(MAD_LIBS) $(OGG_LIBS) \
$(VORBIS_LIBS) \
$(LIBSL_BOOST)
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ AM_PROG_CC_C_O
dnl We want a make install
AC_PROG_INSTALL

dnl pkg-config
PKG_PROG_PKG_CONFIG

dnl --with-werror
AC_ARG_WITH([werror], [AS_HELP_STRING([--with-werror], [Compile with -Werror @<:@default=no@:>@])], [], [with_werror=no])
if test "x$with_werror" = "xyes"; then
Expand Down Expand Up @@ -61,6 +64,8 @@ AX_CHECK_ZLIB(1, 2, 3, 4, , AC_MSG_ERROR([zlib(>= 1.2.3.4) is required and could
dnl Graphic libraries
AX_CHECK_SDL2(2000, , AC_MSG_ERROR([SDL2 (>= 2.0.0) is required and could not be found!]))
AX_CHECK_GL( , AC_MSG_ERROR([OpenGL is required and could not be found!]))
AX_CHECK_OGRE(1.9, , AC_MSG_ERROR([OGRE (>= 1.9) is required and could not be found!]))
AX_CHECK_OGREOVERLAY(1.9, , AC_MSG_ERROR([OGRE-Overlay (>= 1.9) is required and could not be found!]))
AX_CHECK_FT2([11.0.5], , AC_MSG_ERROR([FreeType2 (>= 11.0.5) is required and could not be found!]))
AX_CHECK_XVID(1, 2, 2, , AC_MSG_ERROR([libxvidcore (>= 1.2.2) is required and could not be found!]))

Expand Down
38 changes: 38 additions & 0 deletions m4/ax_check_ogre.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
dnl @synopsis AX_CHECK_OGRE(version, action-if, action-if-not)
dnl
dnl @summary check for OGRE of sufficient version
dnl
dnl Defines OGRE_LIBS, OGRE_CFLAGS and OGRE_PLUGINDIR.
dnl
dnl @category InstalledPackages
dnl @author Sven Hesse <drmccoy@drmccoy.de>
dnl @version 2013-12-14
dnl @license AllPermissive

AC_DEFUN([AX_CHECK_OGRE], [
PKG_CHECK_MODULES(OGRE, [OGRE >= $1], $2, $3)
OGRE_PLUGINDIR=`$PKG_CONFIG --variable=plugindir OGRE`
AC_SUBST(OGRE_CFLAGS)
AC_SUBST(OGRE_LIBS)
AC_SUBST(OGRE_PLUGINDIR)
])

dnl @synopsis AX_CHECK_OGREOVERLAY(version, action-if, action-if-not)
dnl
dnl @summary check for OGRE-Overlay of sufficient version
dnl
dnl Defines OGREOVERLAY_LIBS and OGREOVERLAY_CFLAGS.
dnl
dnl @category InstalledPackages
dnl @author Sven Hesse <drmccoy@drmccoy.de>
dnl @version 2013-12-14
dnl @license AllPermissive

AC_DEFUN([AX_CHECK_OGREOVERLAY], [
PKG_CHECK_MODULES(OGREOVERLAY, [OGRE-Overlay >= $1], $2, $3)
AC_SUBST(OGREOVERLAY_CFLAGS)
AC_SUBST(OGREOVERLAY_LIBS)
])

0 comments on commit 83c94d1

Please sign in to comment.