Skip to content

Commit f18dde2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix-clang-format-reports
2 parents f509f08 + f513801 commit f18dde2

File tree

5 files changed

+44
-39
lines changed

5 files changed

+44
-39
lines changed

.github/workflows/android.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,24 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
image:
19-
- r22
2018
platform:
19+
- android-26
2120
- android-27
22-
- android-29
2321
abi:
2422
- armeabi-v7a
2523
- arm64-v8a
2624
build_type: [Debug, Release]
2725

2826
runs-on: ubuntu-latest
2927

30-
container:
31-
image: bojoe/cpp-android-ndk-build-env-ubuntu:${{ matrix.image }}
32-
options: --user root
33-
3428
steps:
35-
- uses: actions/checkout@v3
29+
- name: Install Ninja
30+
run: sudo apt-get install ninja-build
31+
32+
- uses: actions/checkout@v4
3633
with:
3734
submodules: recursive
3835

39-
- run: cmake -H$GITHUB_WORKSPACE -B/home/developer/build -GNinja -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=${{ matrix.platform }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
36+
- run: cmake -H$GITHUB_WORKSPACE -B$GITHUB_WORKSPACE/build -GNinja -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=${{ matrix.platform }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
4037

41-
- run: cmake --build /home/developer/build
38+
- run: cmake --build $GITHUB_WORKSPACE/build

.github/workflows/code-coverage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ jobs:
3030
- working-directory: build/
3131
run: ctest --output-on-failure
3232

33-
- working-directory: build/
34-
run: bash <(curl -s https://codecov.io/bash)
33+
- uses: codecov/codecov-action@v5
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/macos.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,22 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- xcode: 11
20-
build_type: Debug
21-
os: macos-11
22-
- xcode: 11
19+
- xcode: 14
2320
build_type: Release
24-
os: macos-11
25-
- xcode: 12
26-
build_type: Debug
27-
os: macos-11
28-
- xcode: 12
21+
os: macos-13
22+
- xcode: 15
2923
build_type: Release
30-
os: macos-11
31-
- xcode: 13
32-
build_type: Debug
33-
os: macos-12
34-
- xcode: 13
24+
os: macos-14
25+
- xcode: 16
3526
build_type: Release
36-
os: macos-12
37-
- xcode: 14
38-
build_type: Debug
39-
os: macos-12
40-
- xcode: 14
41-
build_type: Release
42-
os: macos-12
27+
os: macos-15
4328
runs-on: ${{ matrix.os }}
4429

4530
steps:
46-
- uses: actions/checkout@v3
31+
- name: Install Ninja
32+
run: brew install ninja
33+
34+
- uses: actions/checkout@v4
4735
with:
4836
submodules: recursive
4937

@@ -54,10 +42,10 @@ jobs:
5442
- run: cmake -E make_directory build
5543

5644
- working-directory: build/
57-
run: cmake $GITHUB_WORKSPACE
45+
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
5846

5947
- working-directory: build/
60-
run: cmake --build . --config ${{ matrix.build_type }}
48+
run: cmake --build .
6149

6250
- working-directory: build/
63-
run: ctest --config ${{ matrix.build_type }} --output-on-failure
51+
run: ctest --output-on-failure

.pkg-config/taocpp-json.pc.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@"
2+
3+
Name: @PROJECT_NAME@
4+
Description: taoJSON is a C++ header-only JSON library
5+
Version: @PROJECT_VERSION@
6+
URL: https://github.com/taocpp/json
7+
Cflags: -I${includedir}

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8...3.19)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(taocpp-json VERSION 1.0.0 LANGUAGES CXX)
44

@@ -12,6 +12,7 @@ include(GNUInstallDirs)
1212

1313
set(TAOCPP_JSON_INSTALL_DOC_DIR "${CMAKE_INSTALL_DOCDIR}/tao/json" CACHE STRING "The installation doc directory")
1414
set(TAOCPP_JSON_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake" CACHE STRING "The installation cmake directory")
15+
set(TAOCPP_JSON_INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig" CACHE STRING "The installation pkgconfig directory")
1516

1617
# define a header-only library
1718
add_library(taocpp-json INTERFACE)
@@ -61,13 +62,20 @@ option(TAOCPP_JSON_INSTALL "Generate the install target" ${TAOCPP_JSON_IS_MAIN_P
6162
if(TAOCPP_JSON_INSTALL)
6263
include(CMakePackageConfigHelpers)
6364

64-
# Make package findable
65+
# Make package findable by CMake
6566
configure_package_config_file(.cmake/taocpp-json-config.cmake.in ${PROJECT_NAME}-config.cmake
6667
INSTALL_DESTINATION ${TAOCPP_JSON_INSTALL_CMAKE_DIR}
6768
NO_CHECK_REQUIRED_COMPONENTS_MACRO
6869
NO_SET_AND_CHECK_MACRO
6970
)
7071

72+
# Make package findable by pkg-config
73+
configure_package_config_file(.pkg-config/taocpp-json.pc.in ${PROJECT_NAME}.pc
74+
INSTALL_DESTINATION ${TAOCPP_JSON_INSTALL_PKGCONFIG_DIR}
75+
NO_CHECK_REQUIRED_COMPONENTS_MACRO
76+
NO_SET_AND_CHECK_MACRO
77+
)
78+
7179
# Ignore pointer width differences since this is a header-only library
7280
unset(CMAKE_SIZEOF_VOID_P)
7381

@@ -84,6 +92,10 @@ if(TAOCPP_JSON_INSTALL)
8492
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
8593
DESTINATION ${TAOCPP_JSON_INSTALL_CMAKE_DIR}
8694
)
95+
install(FILES
96+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
97+
DESTINATION ${TAOCPP_JSON_INSTALL_PKGCONFIG_DIR}
98+
)
8799
install(EXPORT ${PROJECT_NAME}-targets
88100
NAMESPACE taocpp::
89101
DESTINATION ${TAOCPP_JSON_INSTALL_CMAKE_DIR}

0 commit comments

Comments
 (0)