diff --git a/.gitmodules b/.gitmodules index 701c9c9bb..da779449f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "radio/src/thirdparty/AccessDenied"] path = radio/src/thirdparty/AccessDenied url = https://github.com/raphaelcoeffic/AccessDenied.git -[submodule "companion/src/thirdparty/yaml-cpp"] - path = companion/src/thirdparty/yaml-cpp - url = https://github.com/jbeder/yaml-cpp.git [submodule "radio/src/thirdparty/FreeRTOS"] path = radio/src/thirdparty/FreeRTOS url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git diff --git a/cmake/FetchYamlCpp.cmake b/cmake/FetchYamlCpp.cmake new file mode 100644 index 000000000..ee7556d49 --- /dev/null +++ b/cmake/FetchYamlCpp.cmake @@ -0,0 +1,12 @@ +# Fetch yaml-cpp + +include(FetchContent) + +FetchContent_Declare( + yaml-cpp + GIT_REPOSITORY https://github.com/jbeder/yaml-cpp + GIT_TAG f7320141120f720aecc4c32be25586e7da9eb978 # v0.8.0 +) + +FetchContent_MakeAvailable(yaml-cpp) +message("Fetched yaml-cpp source code from Github: ${yaml-cpp_SOURCE_DIR}") diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index e31e6408a..da6ba5f89 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -182,6 +182,7 @@ set(CPN_COMMON_LIB common) ############# Supporting libraries ############### include(FetchMiniz) +include(FetchYamlCpp) include(FetchMaxLibQt) @@ -195,12 +196,6 @@ add_subdirectory(storage) add_subdirectory(thirdparty/qcustomplot) add_subdirectory(updates) -set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE) -set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE) -set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Enable contrib stuff in library" FORCE) -set(YAML_CPP_INSTALL OFF CACHE BOOL "Enable generation of install target" FORCE) -add_subdirectory(thirdparty/yaml-cpp) - ############# Companion ############### include_directories(${maxLibQt_SOURCE_DIR}/widgets) diff --git a/companion/src/firmwares/CMakeLists.txt b/companion/src/firmwares/CMakeLists.txt index a96617f99..4b1b6035b 100644 --- a/companion/src/firmwares/CMakeLists.txt +++ b/companion/src/firmwares/CMakeLists.txt @@ -73,7 +73,6 @@ target_include_directories(firmwares PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} - ${COMPANION_SRC_DIRECTORY}/thirdparty/yaml-cpp/include PUBLIC "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/er9x" diff --git a/companion/src/thirdparty/yaml-cpp b/companion/src/thirdparty/yaml-cpp deleted file mode 160000 index 1b50109f7..000000000 --- a/companion/src/thirdparty/yaml-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b50109f7bea60bd382d8ea7befce3d2bd67da5f