Skip to content

Commit f93e88d

Browse files
committed
Change rest of JSONCPP_VERSION_* instances
1 parent a32ceec commit f93e88d

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ project(jsoncpp
6868
# 1. ./meson.build
6969
# 2. ./include/json/version.h
7070
# 3. ./CMakeLists.txt
71-
# IMPORTANT: also update the PROJECT_SOVERSION!!
71+
# IMPORTANT: also bump the PROJECT_SOVERSION by 1!!!
7272
VERSION 1.9.4 # <major>[.<minor>[.<patch>[.<tweak>]]]
7373
LANGUAGES CXX)
7474

doc/doxyfile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "JsonCpp"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = %JSONCPP_VERSION%
41+
PROJECT_NUMBER = %PROJECT_VERSION%
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -1215,7 +1215,7 @@ GENERATE_HTMLHELP = %HTML_HELP%
12151215
# written to the html output directory.
12161216
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
12171217

1218-
CHM_FILE = jsoncpp-%JSONCPP_VERSION%.chm
1218+
CHM_FILE = jsoncpp-%PROJECT_VERSION%.chm
12191219

12201220
# The HHC_LOCATION tag can be used to specify the location (absolute path
12211221
# including file name) of the HTML help compiler ( hhc.exe). If non-empty

doc/web_doxyfile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "JsonCpp"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = %JSONCPP_VERSION%
41+
PROJECT_NUMBER = %PROJECT_VERSION%
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -1215,7 +1215,7 @@ GENERATE_HTMLHELP = %HTML_HELP%
12151215
# written to the html output directory.
12161216
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
12171217

1218-
CHM_FILE = jsoncpp-%JSONCPP_VERSION%.chm
1218+
CHM_FILE = jsoncpp-%PROJECT_VERSION%.chm
12191219

12201220
# The HHC_LOCATION tag can be used to specify the location (absolute path
12211221
# including file name) of the HTML help compiler ( hhc.exe). If non-empty

doxybuild.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def do_subst_in_file(targetfile, sourcefile, dict):
4646
with open(sourcefile, 'r') as f:
4747
contents = f.read()
4848
for (k,v) in list(dict.items()):
49-
v = v.replace('\\','\\\\')
49+
v = v.replace('\\','\\\\')
5050
contents = re.sub(k, v, contents)
5151
with open(targetfile, 'w') as f:
5252
f.write(contents)
@@ -113,7 +113,7 @@ def build_doc(options, make_release=False):
113113
def yesno(bool):
114114
return bool and 'YES' or 'NO'
115115
subst_keys = {
116-
'%JSONCPP_VERSION%': version,
116+
'%PROJECT_VERSION%': version,
117117
'%DOC_TOPDIR%': '',
118118
'%TOPDIR%': top_dir,
119119
'%HTML_OUTPUT%': os.path.join('..', output_dir, html_output_dirname),
@@ -158,7 +158,7 @@ def main():
158158
Generates doxygen documentation in build/doxygen.
159159
Optionally makes a tarball of the documentation to dist/.
160160
161-
Must be started in the project top directory.
161+
Must be started in the project top directory.
162162
"""
163163
from optparse import OptionParser
164164
parser = OptionParser(usage=usage)

include/json/version.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
// 1. /meson.build
88
// 2. /include/json/version.h
99
// 3. /CMakeLists.txt
10-
// IMPORTANT: also update the SOVERSION!!
10+
// IMPORTANT: update both the PROJECT_VERSION_STRING as well as the
11+
// major, minor, and patch fields as appropriate here.
1112

12-
#define JSONCPP_VERSION_STRING "1.9.4"
13-
#define JSONCPP_VERSION_MAJOR 1
14-
#define JSONCPP_VERSION_MINOR 9
15-
#define JSONCPP_VERSION_PATCH 4
16-
#define JSONCPP_VERSION_QUALIFIER
17-
#define JSONCPP_VERSION_HEXA \
18-
((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
19-
(JSONCPP_VERSION_PATCH << 8))
13+
#define PROJECT_VERSION_STRING "1.9.4"
14+
#define PROJECT_VERSION_MAJOR 1
15+
#define PROJECT_VERSION_MINOR 9
16+
#define PROJECT_VERSION_PATCH 4
17+
#define PROJECT_VERSION_QUALIFIER
18+
#define PROJECT_VERSION_HEXA \
19+
((PROJECT_VERSION_MAJOR << 24) | (PROJECT_VERSION_MINOR << 16) | \
20+
(PROJECT_VERSION_PATCH << 8))
2021

2122
#ifdef JSONCPP_USING_SECURE_MEMORY
2223
#undef JSONCPP_USING_SECURE_MEMORY

src/test_lib_json/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,9 +3920,9 @@ class VersionTest : public JsonTest::TestCase {};
39203920

39213921
JSONTEST_FIXTURE_LOCAL(VersionTest, VersionNumbersMatch) {
39223922
std::ostringstream vstr;
3923-
vstr << JSONCPP_VERSION_MAJOR << '.' << JSONCPP_VERSION_MINOR << '.'
3924-
<< JSONCPP_VERSION_PATCH;
3925-
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING));
3923+
vstr << PROJECT_VERSION_MAJOR << '.' << PROJECT_VERSION_MINOR << '.'
3924+
<< PROJECT_VERSION_PATCH;
3925+
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(PROJECT_VERSION_STRING));
39263926
}
39273927

39283928
#if defined(__GNUC__)

0 commit comments

Comments
 (0)