Skip to content

Commit bcfc44e

Browse files
update cavl population
1 parent d55e1b4 commit bcfc44e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

cmake/modules/Findcavl.cmake

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,17 @@ include(FetchContent)
99
set(cavl_GIT_REPOSITORY "https://github.com/pavel-kirienko/cavl")
1010
set(cavl_GIT_TAG "c-2.1.0")
1111

12-
FetchContent_Declare(
13-
cavl
14-
GIT_REPOSITORY ${cavl_GIT_REPOSITORY}
15-
GIT_TAG ${cavl_GIT_TAG}
16-
)
12+
FetchContent_Declare(cavl GIT_REPOSITORY ${cavl_GIT_REPOSITORY} GIT_TAG ${cavl_GIT_TAG})
1713
FetchContent_GetProperties(cavl)
1814
if (NOT cavl_POPULATED)
19-
FetchContent_Populate(cavl)
15+
if (FETCHCONTENT_FULLY_DISCONNECTED AND NOT EXISTS "${cavl_SOURCE_DIR}")
16+
set(cavl_FOUND FALSE PARENT_SCOPE)
17+
message(WARNING "cavl unavailable: FETCHCONTENT_FULLY_DISCONNECTED=ON and '${cavl_SOURCE_DIR}' does not exist.")
18+
return()
19+
endif()
20+
FetchContent_MakeAvailable(cavl)
2021
endif ()
2122

22-
23-
#add_library(cavl2_c INTERFACE)
24-
#target_include_directories(cavl2_c INTERFACE "${cavl_SOURCE_DIR}/c")
2523
add_project_library(
2624
NAME cavl2_c
2725
HEADER_PATH "${cavl_SOURCE_DIR}/c"

0 commit comments

Comments
 (0)