Skip to content

Commit

Permalink
chores(cpn): fetch yaml-cpp via cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic committed Oct 27, 2023
1 parent 973da85 commit e143531
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions cmake/FetchYamlCpp.cmake
Original file line number Diff line number Diff line change
@@ -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}")
7 changes: 1 addition & 6 deletions companion/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ set(CPN_COMMON_LIB common)
############# Supporting libraries ###############

include(FetchMiniz)
include(FetchYamlCpp)

add_subdirectory(datamodels)
add_subdirectory(firmwares)
Expand All @@ -196,12 +197,6 @@ add_subdirectory(thirdparty/qcustomplot)
add_subdirectory(thirdparty/maxlibqt/src/widgets)
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 ###############

set(companion_SRCS
Expand Down
1 change: 0 additions & 1 deletion companion/src/firmwares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion companion/src/thirdparty/yaml-cpp
Submodule yaml-cpp deleted from f73201

0 comments on commit e143531

Please sign in to comment.