Skip to content

Commit ec770b6

Browse files
committed
build: utilize CDeps in FindCatch2.cmake
Signed-off-by: Alfi Maulana <[email protected]>
1 parent 0d33339 commit ec770b6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmake/FindCatch2.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
include(CPM)
2-
cpmaddpackage(gh:catchorg/Catch2@${Catch2_FIND_VERSION})
1+
find_package(CDeps 0.1.0 REQUIRED)
32

4-
include(FindPackageHandleStandardArgs)
5-
find_package_handle_standard_args(Catch2 REQUIRED_VARS Catch2_ADDED)
3+
cdeps_download_package(Catch2 github.com/catchorg/Catch2 v${Catch2_FIND_VERSION})
4+
cdeps_build_package(Catch2)
5+
cdeps_install_package(Catch2)
66

7-
list(PREPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)
7+
include(CMakeFindDependencyMacro)
8+
find_dependency(Catch2 ${Catch2_FIND_VERSION} CONFIG
9+
PATHS ${Catch2_INSTALL_DIR}/lib/cmake NO_DEFAULT_PATH)

0 commit comments

Comments
 (0)