Skip to content

Commit

Permalink
iio-emu: Add submodule.
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Perisanu <[email protected]>
  • Loading branch information
Teo Perisanu authored and adisuciu committed Mar 26, 2021
1 parent 5431ea0 commit 309ea6f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "iio-emu"]
path = iio-emu
url = https://github.com/analogdevicesinc/iio-emu.git
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,18 @@ configure_file(${CMAKE_SOURCE_DIR}/resources/aboutpage.qrc

qt5_add_resources(ABOUT_PAGE_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/aboutpage.qrc)

option(CLONE_IIO_EMU "Clone iio-emu" ON)
if (CLONE_IIO_EMU)
message(STATUS "Checking for iio-emu")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
add_subdirectory(iio-emu)
endif()

add_executable(${PROJECT_NAME} WIN32 ${OSX_BUNDLE}
${SRC_LIST}
${RESOURCES}
Expand Down
1 change: 1 addition & 0 deletions iio-emu
Submodule iio-emu added at 710386

0 comments on commit 309ea6f

Please sign in to comment.