瀏覽代碼

Merge pull request #308 from Dooez/master

Set lowercase family string in step 2 of find_package(HAL ...);
Hish15 3 年之前
父節點
當前提交
39b8ae9000
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      cmake/FindHAL.cmake

+ 1 - 0
cmake/FindHAL.cmake

@@ -62,6 +62,7 @@ foreach(family_comp ${HAL_FIND_COMPONENTS_FAMILIES})
     string(REGEX MATCH "^STM32([FGHLMUW]P?[0-9BL])([0-9A-Z][0-9M][A-Z][0-9A-Z])?_?(M0PLUS|M4|M7)?.*$" family_comp ${family_comp})
     if(CMAKE_MATCH_1) #Matches the family part of the provided STM32<FAMILY>[..] component
         set(FAMILY ${CMAKE_MATCH_1})
+        string(TOLOWER ${FAMILY} FAMILY_L)
     endif()
     find_path(HAL_${FAMILY}_PATH
         NAMES Inc/stm32${FAMILY_L}xx_hal.h