mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-01-06 00:31:10 +01:00
commit
c00a3b95c2
@ -45,8 +45,10 @@ Then,
|
|||||||
LIB_TYPE=shared
|
LIB_TYPE=shared
|
||||||
#LIB_TYPE=static
|
#LIB_TYPE=static
|
||||||
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
||||||
ninja -v -C build-${LIB_TYPE} test
|
#ninja -v -C build-${LIB_TYPE} test # This stopped working on my Mac.
|
||||||
|
ninja -v -C build-${LIB_TYPE}
|
||||||
cd build-${LIB_TYPE}
|
cd build-${LIB_TYPE}
|
||||||
|
meson test --no-rebuild --print-errorlogs
|
||||||
sudo ninja install
|
sudo ninja install
|
||||||
|
|
||||||
### Building and testing with other build systems
|
### Building and testing with other build systems
|
||||||
|
17
meson.build
17
meson.build
@ -46,6 +46,14 @@ install_headers(
|
|||||||
jsoncpp_headers,
|
jsoncpp_headers,
|
||||||
subdir : 'json')
|
subdir : 'json')
|
||||||
|
|
||||||
|
if get_option('default_library') == 'shared' and meson.get_compiler('cpp').get_id() == 'msvc'
|
||||||
|
dll_export_flag = '-DJSON_DLL_BUILD'
|
||||||
|
dll_import_flag = '-DJSON_DLL'
|
||||||
|
else
|
||||||
|
dll_export_flag = []
|
||||||
|
dll_import_flag = []
|
||||||
|
endif
|
||||||
|
|
||||||
jsoncpp_lib = library(
|
jsoncpp_lib = library(
|
||||||
'jsoncpp',
|
'jsoncpp',
|
||||||
[ jsoncpp_gen_sources,
|
[ jsoncpp_gen_sources,
|
||||||
@ -56,7 +64,8 @@ jsoncpp_lib = library(
|
|||||||
'src/lib_json/json_writer.cpp'],
|
'src/lib_json/json_writer.cpp'],
|
||||||
soversion : 20,
|
soversion : 20,
|
||||||
install : true,
|
install : true,
|
||||||
include_directories : jsoncpp_include_directories)
|
include_directories : jsoncpp_include_directories,
|
||||||
|
cpp_args: dll_export_flag)
|
||||||
|
|
||||||
import('pkgconfig').generate(
|
import('pkgconfig').generate(
|
||||||
libraries : jsoncpp_lib,
|
libraries : jsoncpp_lib,
|
||||||
@ -82,7 +91,8 @@ jsoncpp_test = executable(
|
|||||||
'src/test_lib_json/main.cpp'],
|
'src/test_lib_json/main.cpp'],
|
||||||
include_directories : jsoncpp_include_directories,
|
include_directories : jsoncpp_include_directories,
|
||||||
link_with : jsoncpp_lib,
|
link_with : jsoncpp_lib,
|
||||||
install : false)
|
install : false,
|
||||||
|
cpp_args: dll_import_flag)
|
||||||
test(
|
test(
|
||||||
'unittest_jsoncpp_test',
|
'unittest_jsoncpp_test',
|
||||||
jsoncpp_test)
|
jsoncpp_test)
|
||||||
@ -92,7 +102,8 @@ jsontestrunner = executable(
|
|||||||
'src/jsontestrunner/main.cpp',
|
'src/jsontestrunner/main.cpp',
|
||||||
include_directories : jsoncpp_include_directories,
|
include_directories : jsoncpp_include_directories,
|
||||||
link_with : jsoncpp_lib,
|
link_with : jsoncpp_lib,
|
||||||
install : false)
|
install : false,
|
||||||
|
cpp_args: dll_import_flag)
|
||||||
test(
|
test(
|
||||||
'unittest_jsontestrunner',
|
'unittest_jsontestrunner',
|
||||||
python,
|
python,
|
||||||
|
@ -17,7 +17,12 @@ set -vex
|
|||||||
|
|
||||||
env | sort
|
env | sort
|
||||||
|
|
||||||
|
meson --version
|
||||||
|
ninja --version
|
||||||
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
||||||
ninja -v -C build-${LIB_TYPE}
|
ninja -v -C build-${LIB_TYPE}
|
||||||
ninja -v -C build-${LIB_TYPE} test
|
#ninja -v -C build-${LIB_TYPE} test
|
||||||
|
cd build-${LIB_TYPE}
|
||||||
|
meson test --no-rebuild --print-errorlogs
|
||||||
|
cd -
|
||||||
rm -r build-${LIB_TYPE}
|
rm -r build-${LIB_TYPE}
|
||||||
|
Loading…
Reference in New Issue
Block a user