Skip to content

Commit 8dce52d

Browse files
authored
Merge pull request #48 from deltaoscarmike/ftgl
Add FTGL configure flag
2 parents dac1173 + 22d63c5 commit 8dce52d

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ before_install:
66

77
# TODO: test different combinations of flags, --enable-sdl, --enable-qt, etc
88
script:
9-
- ./configure --enable-sdl --prefix=$PWD/local && make -j8 && make install # build from checkout
10-
- make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --prefix=$PWD/dist_install && make -j8 && make install # build from dist
9+
- ./configure --enable-sdl --enable-ftgl --prefix=$PWD/local && make -j8 && make install # build from checkout
10+
- make dist && tar -zxf projectM-*.tar.gz && cd projectM-* && ./configure --enable-sdl --enable-ftgl --prefix=$PWD/dist_install && make -j8 && make install # build from dist
1111
- echo "PWD $PWD"
1212
- ls .
1313
- test -e src/projectM-sdl/projectMSDL
@@ -56,7 +56,7 @@ matrix:
5656
- os: osx
5757
osx_image: xcode8
5858
env:
59-
- MATRIX_EVAL="brew update && brew install sdl2"
59+
- MATRIX_EVAL="brew update && brew install sdl2 && brew install ftgl"
6060

6161
notifications:
6262
email:

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ AS_IF([test "x$enable_sdl" = "xyes"], [
3636
AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
3737
])
3838

39+
dnl FTGL
40+
AC_ARG_ENABLE([ftgl],
41+
AS_HELP_STRING([--enable-ftgl], [FTGL support to display text such as preset title, stats, fps, ...]),
42+
[], [enable_ftgl=no])
43+
AS_IF([test "x$enable_ftgl" = "xyes"], [
44+
PKG_CHECK_MODULES(FTGL, [ftgl], [], [AC_MSG_ERROR([libftgl is required.])])
45+
AC_DEFINE([USE_FTGL], [1], [Define USE_FTGL])
46+
])
47+
3948
dnl from https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable answer: https://stackoverflow.com/a/30960268
4049
dnl ptomato https://stackoverflow.com/users/172999/ptomato
4150
AC_SUBST([PACKAGE])
@@ -118,4 +127,5 @@ Applications:
118127
libprojectM: yes
119128
SDL: ${enable_sdl}
120129
Qt & Pulseaudio: ${enable_qt}
130+
FTGL: ${enable_ftgl}
121131
])

src/libprojectM/Common.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <typeinfo>
3131
#include <cstdarg>
3232
#include <cassert>
33+
#include "config.h"
3334
#ifdef _MSC_sVER
3435
#define strcasecmp(s, t) _strcmpi(s, t)
3536
#endif

src/libprojectM/Makefile.am

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ CLEANFILES=
44
SUBDIRS=Renderer NativePresetFactory MilkdropPresetFactory
55

66
AM_CPPFLAGS = \
7-
-include $(top_builddir)/config.h \
8-
-DSYSCONFDIR=\""$(sysconfdir)"\" \
9-
-I$(top_srcdir)/src/libprojectM \
10-
-I$(top_srcdir)/src/libprojectM/Renderer
7+
-include $(top_builddir)/config.h \
8+
-DSYSCONFDIR=\""$(sysconfdir)"\" \
9+
-I$(top_srcdir)/src/libprojectM \
10+
-I$(top_srcdir)/src/libprojectM/Renderer \
11+
${FTGL_CFLAGS}
1112

1213
# system headers/libraries/data to install
1314
include_HEADERS = projectM.hpp

src/libprojectM/Renderer/Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ libRenderer_la_SOURCES = \
4141

4242

4343
libRenderer_la_CPPFLAGS = ${my_CFLAGS} \
44-
-I$(top_srcdir)/src/libprojectM
44+
-I$(top_srcdir)/src/libprojectM \
45+
${FTGL_CFLAGS}
46+
47+
48+
libRenderer_la_LDFLAGS = \
49+
${FTGL_LIBS}

0 commit comments

Comments
 (0)