Skip to content

Commit a63a436

Browse files
authored
Update CPM and Fix CI badge in readme (#145)
* Fix badge links for project status. * Updating CPM
1 parent 5a7d84b commit a63a436

3 files changed

Lines changed: 32 additions & 15 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@ endif()
1212

1313
project(adobe_source_libraries CXX)
1414

15-
# download CPM.cmake
16-
file(
17-
DOWNLOAD
18-
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.8/CPM.cmake
19-
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
20-
EXPECTED_HASH SHA256=78ba32abdf798bc616bab7c73aac32a17bbd7b06ad9e26a6add69de8f3ae4791
21-
)
22-
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
15+
################################################################################
2316

24-
# Enable CPM caching to avoid re-downloading dependencies
17+
# Enable CPM caching to avoid re-downloading dependencies. Must be before CPM.cmake include.
2518
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "Directory to cache CPM packages" FORCE)
2619

20+
include(cmake/CPM.cmake)
21+
2722
################################################################################
2823
# Dependencies
2924

@@ -91,9 +86,7 @@ if(BUILD_DOCS)
9186
if(DOXYGEN_FOUND)
9287
# Download doxygen-awesome-css theme via CPM
9388
CPMAddPackage(
94-
NAME doxygen-awesome-css
95-
GITHUB_REPOSITORY jothepro/doxygen-awesome-css
96-
GIT_TAG v2.3.4
89+
URI gh:jothepro/doxygen-awesome-css@2.3.4
9790
DOWNLOAD_ONLY YES
9891
)
9992
set(AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR})

cmake/CPM.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: MIT
2+
#
3+
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
4+
5+
set(CPM_DOWNLOAD_VERSION 0.42.0)
6+
set(CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
7+
8+
if(CPM_SOURCE_CACHE)
9+
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
10+
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
11+
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
12+
else()
13+
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
14+
endif()
15+
16+
# Expand relative path. This is important if the provided path contains a tilde (~)
17+
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
18+
19+
file(DOWNLOAD
20+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
21+
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
22+
)
23+
24+
include(${CPM_DOWNLOAD_LOCATION})

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Adobe Source Libraries
22

3-
[![CI][ci-badge]][ci-link]
3+
[![Build and Tests][ci-badge][ci-link]
44
[![Documentation][docs-badge]][docs-link]
55
[![License][license-badge]][license-link]
66

77
ASL provides peer-reviewed and portable C++ source libraries. The libraries are intended to be widely useful, leveraging and extending both the C++ Standard Library and the Boost Libraries.
88

9-
[ci-badge]: https://github.com/stlab/adobe_source_libraries/workflows/CI/badge.svg
10-
[ci-link]: https://github.com/stlab/adobe_source_libraries/actions/workflows/ci.yml
9+
[ci-badge]: https://github.com/stlab/adobe_source_libraries/actions/workflows/adobe_source_libraries.yml/badge.svg
10+
[ci-link]: https://github.com/stlab/adobe_source_libraries/actions/workflows/adobe_source_libraries.yml
1111
[docs-badge]: https://img.shields.io/badge/docs-github%20pages-blue
1212
[docs-link]: https://stlab.github.io/adobe_source_libraries/
1313
[license-badge]: https://img.shields.io/badge/license-BSL%201.0-blue.svg

0 commit comments

Comments
 (0)