mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-01-14 01:47:54 +08:00
Merge pull request #173 from cdunn2001/fix-include-amal
help use of amalgamated header Reviewed by "Lightness Races in Orbit" at StackOverflow.
This commit is contained in:
commit
505e086ebc
@ -59,7 +59,7 @@ def amalgamate_source(source_top_dir=None,
|
||||
print("Amalgating header...")
|
||||
header = AmalgamationFile(source_top_dir)
|
||||
header.add_text("/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/).")
|
||||
header.add_text("/// It is intented to be used with #include <%s>" % header_include_path)
|
||||
header.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
|
||||
header.add_file("LICENSE", wrap_in_comment=True)
|
||||
header.add_text("#ifndef JSON_AMALGATED_H_INCLUDED")
|
||||
header.add_text("# define JSON_AMALGATED_H_INCLUDED")
|
||||
@ -85,7 +85,7 @@ def amalgamate_source(source_top_dir=None,
|
||||
print("Amalgating forward header...")
|
||||
header = AmalgamationFile(source_top_dir)
|
||||
header.add_text("/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).")
|
||||
header.add_text("/// It is intented to be used with #include <%s>" % forward_header_include_path)
|
||||
header.add_text('/// It is intended to be used with #include "%s"' % forward_header_include_path)
|
||||
header.add_text("/// This header provides forward declaration for all JsonCpp types.")
|
||||
header.add_file("LICENSE", wrap_in_comment=True)
|
||||
header.add_text("#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED")
|
||||
@ -105,10 +105,15 @@ def amalgamate_source(source_top_dir=None,
|
||||
print("Amalgating source...")
|
||||
source = AmalgamationFile(source_top_dir)
|
||||
source.add_text("/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/).")
|
||||
source.add_text("/// It is intented to be used with #include <%s>" % header_include_path)
|
||||
source.add_text('/// It is intended to be used with #include "%s"' % header_include_path)
|
||||
source.add_file("LICENSE", wrap_in_comment=True)
|
||||
source.add_text("")
|
||||
source.add_text("#include <%s>" % header_include_path)
|
||||
source.add_text('#include "%s"' % header_include_path)
|
||||
source.add_text("""
|
||||
#ifndef JSON_IS_AMALGAMATED
|
||||
#error "Compile with -I PATH_TO_JSON_DIRECTORY"
|
||||
#endif
|
||||
""")
|
||||
source.add_text("")
|
||||
lib_json = "src/lib_json"
|
||||
source.add_file(os.path.join(lib_json, "json_tool.h"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user