Skip to content

Commit f6e2bcc

Browse files
committed
libs: add dependency on CMSIS
1 parent d9d0c6f commit f6e2bcc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ cmake_minimum_required(VERSION 3.19.2)
22

33
project(OBC_SOFTWARE C CXX ASM)
44

5-
add_library(CMSIS_Core INTERFACE) # this is only headers
6-
target_include_directories(CMSIS_Core INTERFACE lib/CMSIS/CMSIS/Core/Include/)
5+
find_package(CMSIS COMPONENTS Core REQUIRED)
76

87
add_library(SAMV71Q21B_DFP OBJECT) # if made a static library the linker will ignore the startup file
98
target_include_directories(SAMV71Q21B_DFP PUBLIC lib/SAMV71_DFP/samv71b/include/)
109
target_sources(SAMV71Q21B_DFP
1110
PRIVATE
1211
lib/SAMV71_DFP/samv71b/gcc/gcc/startup_samv71q21b.c
1312
)
14-
target_link_libraries(SAMV71Q21B_DFP PRIVATE CMSIS_Core)
13+
target_link_libraries(SAMV71Q21B_DFP PRIVATE CMSIS::Core)
1514

1615
add_executable(${PROJECT_NAME})
1716
target_include_directories(${PROJECT_NAME} PRIVATE include/)
1817
target_sources(${PROJECT_NAME} PRIVATE src/main.c)
19-
target_link_libraries(${PROJECT_NAME} PRIVATE SAMV71Q21B_DFP CMSIS_Core)
18+
target_link_libraries(${PROJECT_NAME} PRIVATE SAMV71Q21B_DFP CMSIS::Core)

conanfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class SAMV71BlinkyRecipe(ConanFile):
1515
# Binary configuration
1616
settings = "os", "compiler", "build_type", "arch"
1717

18+
requires = "cmsis/5.4.0"
19+
1820
# Sources are located in the same place as this recipe, copy them to the recipe
1921
exports_sources = "CMakeLists.txt", "src/*"
2022

0 commit comments

Comments
 (0)