Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 08ac499

Browse files
committed
Fixed bug where platform libs names were converted to PascalCase
1 parent 55f0eed commit 08ac499

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cmake/Platform/Libraries/LibrariesFinder.cmake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ function(find_arduino_library _target_name _library_name)
2121
set(argument_options "3RD_PARTY" "HEADER_ONLY" "QUIET")
2222
cmake_parse_arguments(parsed_args "${argument_options}" "" "" ${ARGN})
2323

24-
if (NOT parsed_args_3RD_PARTY)
24+
is_platform_library(${_library_name} is_plib) # Detect whether library is a platform library
25+
26+
if (NOT parsed_args_3RD_PARTY AND NOT is_plib)
2527
convert_string_to_pascal_case(${_library_name} _library_name)
2628
endif ()
2729

@@ -47,11 +49,9 @@ function(find_arduino_library _target_name _library_name)
4749
message(SEND_ERROR "Couldn't find any header files for the "
4850
"${_library_name} library")
4951
endif ()
50-
5152
else ()
5253
if (parsed_args_HEADER_ONLY)
5354
add_arduino_header_only_library(${_target_name} ${library_headers})
54-
5555
else ()
5656
find_library_source_files("${library_path}" library_sources)
5757

@@ -68,15 +68,12 @@ function(find_arduino_library _target_name _library_name)
6868
else ()
6969
set(sources ${library_headers} ${library_sources})
7070

71-
is_platform_library(${_library_name} is_plib)
7271
if (is_plib)
7372
add_arduino_library(${_target_name} PLATFORM ${sources})
7473
else ()
7574
add_arduino_library(${_target_name} ${sources})
7675
endif ()
77-
7876
endif ()
79-
8077
endif ()
8178
endif ()
8279
endif ()

0 commit comments

Comments
 (0)