Skip to content

Meson updates #1124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ project(JSONCPP
# 2. /include/json/version.h
# 3. /CMakeLists.txt
# IMPORTANT: also update the SOVERSION!!
VERSION 1.9.2 # <major>[.<minor>[.<patch>[.<tweak>]]]
VERSION 1.9.3 # <major>[.<minor>[.<patch>[.<tweak>]]]
LANGUAGES CXX)

message(STATUS "JsonCpp Version: ${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}")
Expand Down
4 changes: 2 additions & 2 deletions include/json/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// 3. /CMakeLists.txt
// IMPORTANT: also update the SOVERSION!!

#define JSONCPP_VERSION_STRING "1.9.2"
#define JSONCPP_VERSION_STRING "1.9.3"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

JSONCPP_VERSION_STRING

#define JSONCPP_VERSION_MAJOR 1
#define JSONCPP_VERSION_MINOR 9
#define JSONCPP_VERSION_PATCH 2
#define JSONCPP_VERSION_PATCH 3
#define JSONCPP_VERSION_QUALIFIER
#define JSONCPP_VERSION_HEXA \
((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
Expand Down
33 changes: 18 additions & 15 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ project(
# 2. /include/json/version.h
# 3. /CMakeLists.txt
# IMPORTANT: also update the SOVERSION!!
version : '1.9.2',
version : '1.9.3',
default_options : [
'buildtype=release',
'cpp_std=c++11',
Expand All @@ -18,7 +18,7 @@ project(
meson_version : '>= 0.49.0')


jsoncpp_headers = [
jsoncpp_headers = files([
'include/json/allocator.h',
'include/json/assertions.h',
'include/json/config.h',
Expand All @@ -28,7 +28,8 @@ jsoncpp_headers = [
'include/json/reader.h',
'include/json/value.h',
'include/json/version.h',
'include/json/writer.h']
'include/json/writer.h',
])
jsoncpp_include_directories = include_directories('include')

install_headers(
Expand All @@ -44,13 +45,12 @@ else
endif

jsoncpp_lib = library(
'jsoncpp',
[ jsoncpp_headers,
'src/lib_json/json_tool.h',
'jsoncpp', files([
'src/lib_json/json_reader.cpp',
'src/lib_json/json_value.cpp',
'src/lib_json/json_writer.cpp'],
soversion : 22,
'src/lib_json/json_writer.cpp',
]),
soversion : 23,
install : true,
include_directories : jsoncpp_include_directories,
cpp_args: dll_export_flag)
Expand All @@ -66,18 +66,21 @@ import('pkgconfig').generate(
jsoncpp_dep = declare_dependency(
include_directories : jsoncpp_include_directories,
link_with : jsoncpp_lib,
version : meson.project_version(),
)
version : meson.project_version())

# tests
python = import('python').find_installation()
if meson.is_subproject() or not get_option('tests')
subdir_done()
endif

python = import('python').find_installation('python3')

jsoncpp_test = executable(
'jsoncpp_test',
[ 'src/test_lib_json/jsontest.cpp',
'src/test_lib_json/jsontest.h',
'jsoncpp_test', files([
'src/test_lib_json/jsontest.cpp',
'src/test_lib_json/main.cpp',
'src/test_lib_json/fuzz.cpp'],
'src/test_lib_json/fuzz.cpp',
]),
include_directories : jsoncpp_include_directories,
link_with : jsoncpp_lib,
install : false,
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
option(
'tests',
type : 'boolean',
value : true,
description : 'Enable building tests')