Skip to content

Commit

Permalink
Merge pull request capnproto#109 from greedy/add-includedir-to-imports
Browse files Browse the repository at this point in the history
Add configured includedir as a default import path
  • Loading branch information
kentonv committed Jul 16, 2014
2 parents c859889 + a3232d2 commit 29bdbab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion c++/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ clean-local:
cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi

AM_CXXFLAGS = -I$(srcdir)/src -I$(builddir)/src $(PTHREAD_CFLAGS)
AM_CXXFLAGS = -I$(srcdir)/src -I$(builddir)/src -DCAPNP_INCLUDE_DIR='"$(includedir)"' $(PTHREAD_CFLAGS)

AM_LDFLAGS = $(PTHREAD_CFLAGS)

Expand Down
3 changes: 3 additions & 0 deletions c++/src/capnp/compiler/capnp.c++
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ public:
if (addStandardImportPaths) {
loader.addImportPath(kj::heapString("/usr/local/include"));
loader.addImportPath(kj::heapString("/usr/include"));
#ifdef CAPNP_INCLUDE_DIR
loader.addImportPath(kj::heapString(CAPNP_INCLUDE_DIR));
#endif
addStandardImportPaths = false;
}

Expand Down

0 comments on commit 29bdbab

Please sign in to comment.