Skip to content
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
17 changes: 5 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ endif()

project(adobe_source_libraries CXX)

# download CPM.cmake
file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.8/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
EXPECTED_HASH SHA256=78ba32abdf798bc616bab7c73aac32a17bbd7b06ad9e26a6add69de8f3ae4791
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
################################################################################

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

include(cmake/CPM.cmake)

################################################################################
# Dependencies

Expand Down Expand Up @@ -91,9 +86,7 @@ if(BUILD_DOCS)
if(DOXYGEN_FOUND)
# Download doxygen-awesome-css theme via CPM
CPMAddPackage(
NAME doxygen-awesome-css
GITHUB_REPOSITORY jothepro/doxygen-awesome-css
GIT_TAG v2.3.4
URI gh:jothepro/doxygen-awesome-css@2.3.4
DOWNLOAD_ONLY YES
)
set(AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR})
Expand Down
24 changes: 24 additions & 0 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors

set(CPM_DOWNLOAD_VERSION 0.42.0)
set(CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

# Expand relative path. This is important if the provided path contains a tilde (~)
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)

file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
)

include(${CPM_DOWNLOAD_LOCATION})
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Adobe Source Libraries

[![CI][ci-badge]][ci-link]
[![Build and Tests][ci-badge][ci-link]
[![Documentation][docs-badge]][docs-link]
[![License][license-badge]][license-link]

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.

[ci-badge]: https://github.com/stlab/adobe_source_libraries/workflows/CI/badge.svg
[ci-link]: https://github.com/stlab/adobe_source_libraries/actions/workflows/ci.yml
[ci-badge]: https://github.com/stlab/adobe_source_libraries/actions/workflows/adobe_source_libraries.yml/badge.svg
[ci-link]: https://github.com/stlab/adobe_source_libraries/actions/workflows/adobe_source_libraries.yml
[docs-badge]: https://img.shields.io/badge/docs-github%20pages-blue
[docs-link]: https://stlab.github.io/adobe_source_libraries/
[license-badge]: https://img.shields.io/badge/license-BSL%201.0-blue.svg
Expand Down
Loading