Skip to content

Commit d6152a0

Browse files
committed
Revert to JSONCPP_(SO)?VERSION_*
1 parent ab01a90 commit d6152a0

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ if(CCACHE_EXECUTABLE)
6161
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" CACHE PATH "ccache" FORCE)
6262
endif()
6363

64-
project(jsoncpp
64+
project(JSONCPP
6565
# Note: version must be updated in three places when doing a release. This
6666
# annoying process ensures that amalgamate, CMake, and meson all report the
6767
# correct version.
6868
# 1. ./meson.build
6969
# 2. ./include/json/version.h
7070
# 3. ./CMakeLists.txt
71-
# IMPORTANT: also bump the PROJECT_SOVERSION by 1!!!
71+
# IMPORTANT: also bump the JSONCPP_SOVERSION by 1!!!
7272
VERSION 1.9.4 # <major>[.<minor>[.<patch>[.<tweak>]]]
7373
LANGUAGES CXX)
7474

75-
message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
76-
set(PROJECT_SOVERSION 24)
75+
message(STATUS "JsonCpp Version: ${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}")
76+
set(JSONCPP_SOVERSION 24)
7777

7878
option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" ON)
7979
option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON)
@@ -169,7 +169,7 @@ if(JSONCPP_WITH_CMAKE_PACKAGE)
169169
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/jsoncpp
170170
FILE jsoncppConfig.cmake)
171171
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/jsoncppConfigVersion.cmake"
172-
VERSION ${PROJECT_VERSION}
172+
VERSION ${JSONCPP_VERSION}
173173
COMPATIBILITY SameMajorVersion)
174174
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jsoncppConfigVersion.cmake
175175
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/jsoncpp)

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 = %PROJECT_VERSION%
41+
PROJECT_NUMBER = %JSONCPP_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-%PROJECT_VERSION%.chm
1218+
CHM_FILE = jsoncpp-%JSONCPP_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 = %PROJECT_VERSION%
41+
PROJECT_NUMBER = %JSONCPP_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-%PROJECT_VERSION%.chm
1218+
CHM_FILE = jsoncpp-%JSONCPP_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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-
'%PROJECT_VERSION%': version,
116+
'%JSONCPP_VERSION%': version,
117117
'%DOC_TOPDIR%': '',
118118
'%TOPDIR%': top_dir,
119119
'%HTML_OUTPUT%': os.path.join('..', output_dir, html_output_dirname),

include/json/version.h

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

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))
13+
#define JSONCPP_VERSION_STRING "1.9.4"
14+
#define JSONCPP_VERSION_MAJOR 1
15+
#define JSONCPP_VERSION_MINOR 9
16+
#define JSONCPP_VERSION_PATCH 4
17+
#define JSONCPP_VERSION_QUALIFIER
18+
#define JSONCPP_VERSION_HEXA \
19+
((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
20+
(JSONCPP_VERSION_PATCH << 8))
2121

2222
#ifdef JSONCPP_USING_SECURE_MEMORY
2323
#undef JSONCPP_USING_SECURE_MEMORY

pkg-config/jsoncpp.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ includedir=@includedir_for_pc_file@
55

66
Name: jsoncpp
77
Description: A C++ library for interacting with JSON
8-
Version: @PROJECT_VERSION@
8+
Version: @JSONCPP_VERSION@
99
URL: https://github.com/open-source-parsers/jsoncpp
1010
Libs: -L${libdir} -ljsoncpp
1111
Cflags: -I${includedir}

src/lib_json/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ if(BUILD_SHARED_LIBS)
127127
add_library(${SHARED_LIB} SHARED ${PUBLIC_HEADERS} ${JSONCPP_SOURCES})
128128
set_target_properties(${SHARED_LIB} PROPERTIES
129129
OUTPUT_NAME jsoncpp
130-
VERSION ${PROJECT_VERSION}
131-
SOVERSION ${PROJECT_SOVERSION}
130+
VERSION ${JSONCPP_VERSION}
131+
SOVERSION ${JSONCPP_SOVERSION}
132132
POSITION_INDEPENDENT_CODE ON
133133
)
134134

@@ -161,7 +161,7 @@ if(BUILD_STATIC_LIBS)
161161

162162
set_target_properties(${STATIC_LIB} PROPERTIES
163163
OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
164-
VERSION ${PROJECT_VERSION}
164+
VERSION ${JSONCPP_VERSION}
165165
)
166166

167167
# Set library's runtime search path on OSX
@@ -188,8 +188,8 @@ if(BUILD_OBJECT_LIBS)
188188

189189
set_target_properties(${OBJECT_LIB} PROPERTIES
190190
OUTPUT_NAME jsoncpp
191-
VERSION ${PROJECT_VERSION}
192-
SOVERSION ${PROJECT_SOVERSION}
191+
VERSION ${JSONCPP_VERSION}
192+
SOVERSION ${JSONCPP_SOVERSION}
193193
POSITION_INDEPENDENT_CODE ON
194194
)
195195

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 << PROJECT_VERSION_MAJOR << '.' << PROJECT_VERSION_MINOR << '.'
3924-
<< PROJECT_VERSION_PATCH;
3925-
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(PROJECT_VERSION_STRING));
3923+
vstr << JSONCPP_VERSION_MAJOR << '.' << JSONCPP_VERSION_MINOR << '.'
3924+
<< JSONCPP_VERSION_PATCH;
3925+
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING));
39263926
}
39273927

39283928
#if defined(__GNUC__)

version.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@PROJECT_VERSION@
1+
@JSONCPP_VERSION@

0 commit comments

Comments
 (0)