Improved method of getting data file locations
This commit is contained in:
parent
928efe501c
commit
ba2f426fe0
3 changed files with 18 additions and 5 deletions
20
Makefile.am
20
Makefile.am
|
|
@ -18,9 +18,21 @@ Game_SOURCES = \
|
||||||
src/ShaderLoader.cpp
|
src/ShaderLoader.cpp
|
||||||
|
|
||||||
|
|
||||||
Game_CPPFLAGS = @sdl2_CFLAGS@ @glew_CFLAGS@ @opengl_CFLAGS@ @glm_CFLAGS@ @sdl2_image_CFLAGS@
|
# Generate final path locations based on configuration at compile time
|
||||||
|
CLEANFILES = config_file_paths.h
|
||||||
|
DISTCLEANFILES = config_file_paths.h
|
||||||
|
BUILT_SOURCES = config_file_paths.h
|
||||||
|
config_file_paths.h:
|
||||||
|
echo '#define DATADIR "$(pkgdatadir)"' >$@
|
||||||
|
|
||||||
Game_LDFLAGS = @sdl2_LIBS@ @glew_LIBS@ @opengl_LIBS@ @glm_LIBS@ @sdl2_image_LIBS@
|
Game_CPPFLAGS = @sdl2_CFLAGS@ \
|
||||||
|
@glew_CFLAGS@ \
|
||||||
|
@opengl_CFLAGS@ \
|
||||||
|
@glm_CFLAGS@ \
|
||||||
|
@sdl2_image_CFLAGS@
|
||||||
|
|
||||||
#AM_CPPFLAGS = -DDATADIR=\"$(pkgdatadir)\"
|
Game_LDFLAGS = @sdl2_LIBS@ \
|
||||||
Game_CPPFLAGS += -DDATADIR=\"$(pkgdatadir)\"
|
@glew_LIBS@ \
|
||||||
|
@opengl_LIBS@ \
|
||||||
|
@glm_LIBS@ \
|
||||||
|
@sdl2_image_LIBS@
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
# This is actually defined in Makefile.am
|
# This is actually defined in Makefile.am
|
||||||
# But this stops intellisense like software from complaining
|
# But this stops intellisense like software from complaining
|
||||||
AC_DEFINE_UNQUOTED([DATAPATH], ["$pkgdatadir"],"DData Directory Path")
|
#AC_DEFINE_UNQUOTED([DATAPATH], ["$pkgdatadir"],"DData Directory Path")
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
// Include Config header generated by GNU autotools
|
// Include Config header generated by GNU autotools
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
|
#include "../config_file_paths.h"
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
// Make sure Glew is loaded first
|
// Make sure Glew is loaded first
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue