Skip to content

Commit 490f7c0

Browse files
committed
build: utilize CDeps in FindFixFormat.cmake
Signed-off-by: Alfi Maulana <[email protected]>
1 parent e55abd6 commit 490f7c0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cmake/FindFixFormat.cmake

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
include(CPM)
2-
cpmaddpackage(gh:threeal/FixFormat.cmake@${FixFormat_FIND_VERSION})
1+
find_package(CDeps 0.1.0 REQUIRED)
32

4-
include(FindPackageHandleStandardArgs)
5-
find_package_handle_standard_args(FixFormat REQUIRED_VARS FixFormat.cmake_ADDED)
3+
cdeps_download_package(
4+
FixFormat github.com/threeal/FixFormat.cmake
5+
v${FixFormat_FIND_VERSION})
66

7-
list(PREPEND CMAKE_MODULE_PATH ${FixFormat_SOURCE_DIR}/cmake)
7+
cdeps_build_package(FixFormat)
8+
cdeps_install_package(FixFormat)
9+
10+
# TODO: Hardcode the version because FixFormat.cmake has an inconsistent version.
11+
include(CMakeFindDependencyMacro)
12+
find_dependency(FixFormat 1.1.0 CONFIG
13+
PATHS ${FixFormat_INSTALL_DIR}/lib/cmake NO_DEFAULT_PATH)

0 commit comments

Comments
 (0)