host: fsk submodule init on make
This commit is contained in:
parent
931f6eb2ff
commit
dcf0884c2a
1 changed files with 24 additions and 0 deletions
|
|
@ -1,5 +1,29 @@
|
|||
cmake_minimum_required(VERSION 3.10...3.27)
|
||||
|
||||
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk/c)
|
||||
message(STATUS "bladeRF-fsk: Attempting to initialize missing submodule")
|
||||
|
||||
find_package(Git QUIET)
|
||||
|
||||
if(Git_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${Git_EXECUTABLE} submodule init
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${Git_EXECUTABLE} submodule update
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk/c)
|
||||
message(FATAL_ERROR "Directory ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk was not found. "
|
||||
"It appears that this submodule has not been properly "
|
||||
"initialized. Please run 'git submodule init' and "
|
||||
"'git submodule update', and then re-run cmake.")
|
||||
endif()
|
||||
|
||||
add_subdirectory(bladeRF-cli)
|
||||
add_subdirectory(bladeRF-update)
|
||||
if(NOT MSVC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue