20 lines
406 B
CMake
20 lines
406 B
CMake
cmake_minimum_required(VERSION 3.22)
|
|
|
|
# Create w25qxx library
|
|
add_library(w25qxx STATIC)
|
|
|
|
# Add w25qxx sources
|
|
target_sources(w25qxx PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Src/w25qxx.c
|
|
)
|
|
|
|
# Add w25qxx include directories
|
|
target_include_directories(w25qxx PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Inc
|
|
)
|
|
|
|
# Link with stm32cubemx and hal libraries
|
|
target_link_libraries(w25qxx PRIVATE
|
|
stm32cubemx
|
|
hal
|
|
) |