From dd66e37353dcc06e7e75a6c63db548870d12e823 Mon Sep 17 00:00:00 2001 From: frohlich Date: Thu, 4 Jun 2009 04:30:51 +0000 Subject: [PATCH] More default setup for FG_ROOT Modified Files: fgviewer/Makefile.am fgviewer/fgviewer.cxx --- utils/fgviewer/Makefile.am | 3 +++ utils/fgviewer/fgviewer.cxx | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/utils/fgviewer/Makefile.am b/utils/fgviewer/Makefile.am index c0384d803..9d9b18534 100644 --- a/utils/fgviewer/Makefile.am +++ b/utils/fgviewer/Makefile.am @@ -1,3 +1,6 @@ + +AM_CXXFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" + bin_PROGRAMS = fgviewer fgviewer_SOURCES = fgviewer.cxx diff --git a/utils/fgviewer/fgviewer.cxx b/utils/fgviewer/fgviewer.cxx index 6851dbd5f..42f2104ca 100644 --- a/utils/fgviewer/fgviewer.cxx +++ b/utils/fgviewer/fgviewer.cxx @@ -81,7 +81,11 @@ main(int argc, char** argv) if (fg_root_env) fg_root = fg_root_env; else +#if defined(PKGDATADIR) + fg_root = PKGDATADIR; +#else fg_root = "."; +#endif osgDB::FilePathList filePathList; filePathList.push_back(fg_root);