diff --git a/.github/workflows/varmint_firmware.yml b/.github/workflows/varmint_firmware.yml index 9a782e3c..1f894760 100644 --- a/.github/workflows/varmint_firmware.yml +++ b/.github/workflows/varmint_firmware.yml @@ -12,7 +12,7 @@ jobs: - name: checkout submodules run: git submodule update --init --recursive - name: install toolchain - run: sudo apt -y install gcc-arm-none-eabi libeigen3-dev + run: sudo apt -y install gcc-arm-none-eabi - name: check toolchain run: arm-none-eabi-gcc --version - name: build varmint diff --git a/CMakeLists.txt b/CMakeLists.txt index c535ebb8..799163d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,10 +28,16 @@ if("${GIT_VERSION_HASH}" STREQUAL "") set(GIT_VERSION_HASH "0") endif() -### source files ### -find_package(Eigen3 REQUIRED) -include_directories(${EIGEN3_INCLUDE_DIRS}) +### Install Eigen dependency ### +include(FetchContent) +FetchContent_Declare( + Eigen3 + GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git + GIT_TAG origin/3.4 +) +FetchContent_MakeAvaliable(Eigen3) +### source files ### include_directories( include include/interface @@ -39,7 +45,7 @@ include_directories( comms/mavlink comms/mavlink/v1.0 comms/mavlink/v1.0/common - comms/mavlink/v1.0/rosflight + ${eigen3_SOURCE_DIR} ) file(GLOB_RECURSE ROSFLIGHT_SOURCES