mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-23 00:48:51 +02:00
Set up for Bazel module builds. (#1597)
* Set up for Bazel module builds. Note: the MODULE.bazel is copied from https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/jsoncpp/1.9.6/MODULE.bazel * More tweaks to .gitignore
This commit is contained in:
parent
ba004477a6
commit
037752d9a1
4
.gitignore
vendored
4
.gitignore
vendored
@ -55,3 +55,7 @@ compile_commands.json
|
|||||||
|
|
||||||
# temps
|
# temps
|
||||||
/version
|
/version
|
||||||
|
|
||||||
|
# Bazel output paths
|
||||||
|
/bazel-*
|
||||||
|
/MODULE.bazel.lock
|
||||||
|
@ -55,12 +55,13 @@ endif()
|
|||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
project(jsoncpp
|
project(jsoncpp
|
||||||
# Note: version must be updated in three places when doing a release. This
|
# Note: version must be updated in four places when doing a release. This
|
||||||
# annoying process ensures that amalgamate, CMake, and meson all report the
|
# annoying process ensures that amalgamate, CMake, and meson all report the
|
||||||
# correct version.
|
# correct version.
|
||||||
# 1. ./meson.build
|
# 1. ./meson.build
|
||||||
# 2. ./include/json/version.h
|
# 2. ./include/json/version.h
|
||||||
# 3. ./CMakeLists.txt
|
# 3. ./CMakeLists.txt
|
||||||
|
# 4. ./MODULE.bazel
|
||||||
# IMPORTANT: also update the PROJECT_SOVERSION!!
|
# IMPORTANT: also update the PROJECT_SOVERSION!!
|
||||||
VERSION 1.9.7 # <major>[.<minor>[.<patch>[.<tweak>]]]
|
VERSION 1.9.7 # <major>[.<minor>[.<patch>[.<tweak>]]]
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
14
MODULE.bazel
Normal file
14
MODULE.bazel
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
module(
|
||||||
|
name = "jsoncpp",
|
||||||
|
|
||||||
|
# Note: version must be updated in four places when doing a release. This
|
||||||
|
# annoying process ensures that amalgamate, CMake, and meson all report the
|
||||||
|
# correct version.
|
||||||
|
# 1. /meson.build
|
||||||
|
# 2. /include/json/version.h
|
||||||
|
# 3. /CMakeLists.txt
|
||||||
|
# 4. /MODULE.bazel
|
||||||
|
# IMPORTANT: also update the SOVERSION!!
|
||||||
|
version = "1.9.7",
|
||||||
|
compatibility_level = 1,
|
||||||
|
)
|
@ -1,12 +1,13 @@
|
|||||||
#ifndef JSON_VERSION_H_INCLUDED
|
#ifndef JSON_VERSION_H_INCLUDED
|
||||||
#define JSON_VERSION_H_INCLUDED
|
#define JSON_VERSION_H_INCLUDED
|
||||||
|
|
||||||
// Note: version must be updated in three places when doing a release. This
|
// Note: version must be updated in four places when doing a release. This
|
||||||
// annoying process ensures that amalgamate, CMake, and meson all report the
|
// annoying process ensures that amalgamate, CMake, and meson all report the
|
||||||
// correct version.
|
// correct version.
|
||||||
// 1. /meson.build
|
// 1. /meson.build
|
||||||
// 2. /include/json/version.h
|
// 2. /include/json/version.h
|
||||||
// 3. /CMakeLists.txt
|
// 3. /CMakeLists.txt
|
||||||
|
// 4. /MODULE.bazel
|
||||||
// IMPORTANT: also update the SOVERSION!!
|
// IMPORTANT: also update the SOVERSION!!
|
||||||
|
|
||||||
#define JSONCPP_VERSION_STRING "1.9.7"
|
#define JSONCPP_VERSION_STRING "1.9.7"
|
||||||
|
@ -2,12 +2,13 @@ project(
|
|||||||
'jsoncpp',
|
'jsoncpp',
|
||||||
'cpp',
|
'cpp',
|
||||||
|
|
||||||
# Note: version must be updated in three places when doing a release. This
|
# Note: version must be updated in four places when doing a release. This
|
||||||
# annoying process ensures that amalgamate, CMake, and meson all report the
|
# annoying process ensures that amalgamate, CMake, and meson all report the
|
||||||
# correct version.
|
# correct version.
|
||||||
# 1. /meson.build
|
# 1. /meson.build
|
||||||
# 2. /include/json/version.h
|
# 2. /include/json/version.h
|
||||||
# 3. /CMakeLists.txt
|
# 3. /CMakeLists.txt
|
||||||
|
# 4. /MODULE.bazel
|
||||||
# IMPORTANT: also update the SOVERSION!!
|
# IMPORTANT: also update the SOVERSION!!
|
||||||
version : '1.9.7',
|
version : '1.9.7',
|
||||||
default_options : [
|
default_options : [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user