Skip to content

Commit

Permalink
build: download Assertion.tar.gz to fulfill Assertion package find (#…
Browse files Browse the repository at this point in the history
…138)

Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>
  • Loading branch information
threeal authored Oct 23, 2024
1 parent 4d44de1 commit 33bef72
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cmake/FindAssertion.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
file(
DOWNLOAD https://github.com/threeal/assertion-cmake/releases/download/v2.0.0/Assertion.cmake
${CMAKE_BINARY_DIR}/cmake/Assertion.cmake
EXPECTED_MD5 5ebe475aee6fc5660633152f815ce9f6)
include(${CMAKE_BINARY_DIR}/cmake/Assertion.cmake)
set(DOWNLOAD_URL https://github.com/threeal/assertion-cmake/releases/download)
file(DOWNLOAD ${DOWNLOAD_URL}/v${Assertion_FIND_VERSION}/Assertion.tar.gz
${CMAKE_BINARY_DIR}/_deps/Assertion.tar.gz)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Assertion REQUIRED_VARS ASSERTION_VERSION VERSION_VAR ASSERTION_VERSION)
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/_deps/Assertion.tar.gz
DESTINATION ${CMAKE_BINARY_DIR}/_deps)

list(PREPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/cmake)
include(CMakeFindDependencyMacro)
find_dependency(Assertion CONFIG PATHS ${CMAKE_BINARY_DIR}/_deps)

0 comments on commit 33bef72

Please sign in to comment.