Skip to content

Commit 45d68d9

Browse files
committed
WIP: mod: cmake/modules/FindUnifySDK.cmake (review/9/main)
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent 8869c81 commit 45d68d9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmake/modules/FindUnifySDK.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
include(FetchContent)
22

33
if(NOT DEFINED UNIFYSDK_GIT_REPOSITORY)
4-
if(DEFINED $ENV{UNIFYSDK_GIT_REPOSITORY})
4+
if(DEFINED ENV{UNIFYSDK_GIT_REPOSITORY})
55
set(UNIFYSDK_GIT_REPOSITORY $ENV{UNIFYSDK_GIT_REPOSITORY})
66
else()
77
set(UNIFYSDK_GIT_REPOSITORY https://github.com/SiliconLabs/UnifySDK)
88
endif()
99
endif()
1010

1111
if(NOT DEFINED UNIFYSDK_GIT_TAG)
12-
if(DEFINED $ENV{UNIFYSDK_GIT_TAG})
13-
set(UNIFYSDK_GIT_GET $ENV{UNIFYSDK_GIT_TAG})
12+
if(DEFINED ENV{UNIFYSDK_GIT_TAG})
13+
set(UNIFYSDK_GIT_TAG $ENV{UNIFYSDK_GIT_TAG})
1414
else()
15-
message(WARNING "TODO: Pin stable revision once supported")
1615
set(UNIFYSDK_GIT_TAG main)
16+
message(WARNING "Using: ${UNIFYSDK_GIT_TAG} TODO: Pin stable revision once supported")
1717
endif()
18+
else()
19+
1820
endif()
1921

2022
FetchContent_Declare(
@@ -27,7 +29,7 @@ FetchContent_Declare(
2729

2830
# Pull only once, this has be refreshed by developer
2931
if(NOT EXISTS ${CMAKE_BINARY_DIR}/_deps/unifysdk-src)
30-
message(STATUS "Fetching UnifySDK from ${UNIFYSDK_GIT_REPOSITORY}#${UNIFYSDK_GIT_TAG}")
32+
message(STATUS "Downloading: ${UNIFYSDK_GIT_REPOSITORY}#${UNIFYSDK_GIT_TAG}")
3133
FetchContent_MakeAvailable(UnifySDK)
3234
else()
3335
message(STATUS "Using UnifySDK from previous fetch (may be outdated)")

0 commit comments

Comments
 (0)