From e6aa6b88d5f620944bde8e9a7c69aa7a4a99e38f Mon Sep 17 00:00:00 2001 From: Benjamin Maitland Date: Thu, 6 Feb 2020 13:31:45 -0500 Subject: [PATCH] Fixed #98 by removing camelCasing of library names --- cmake/Platform/Libraries/LibrariesFinder.cmake | 4 ---- examples/CMakeLists.txt | 1 + examples/arduino-library/CMakeLists.txt | 2 +- examples/platform-library/CMakeLists.txt | 3 +++ examples/platform-library/platformLibrary.cpp | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/Platform/Libraries/LibrariesFinder.cmake b/cmake/Platform/Libraries/LibrariesFinder.cmake index 85700d1..4e90017 100644 --- a/cmake/Platform/Libraries/LibrariesFinder.cmake +++ b/cmake/Platform/Libraries/LibrariesFinder.cmake @@ -27,10 +27,6 @@ function(find_arduino_library _target_name _library_name) is_platform_library(${_library_name} is_plib) # Detect whether library is a platform library - if (NOT parsed_args_3RD_PARTY AND NOT is_plib) - convert_string_to_pascal_case(${_library_name} _library_name) - endif () - find_file(library_path NAMES "${_library_name}" PATHS ${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} ${ARDUINO_SDK_LIBRARIES_PATH} diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4f6216b..034d2a6 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,4 @@ +set(CMAKE_TOOLCHAIN_FILE ../cmake/Arduino-Toolchain.cmake) cmake_minimum_required(VERSION 3.8.2) project(Examples LANGUAGES C CXX ASM) diff --git a/examples/arduino-library/CMakeLists.txt b/examples/arduino-library/CMakeLists.txt index 911dbbe..23907d3 100644 --- a/examples/arduino-library/CMakeLists.txt +++ b/examples/arduino-library/CMakeLists.txt @@ -7,7 +7,7 @@ arduino_cmake_project(Arduino_Library BOARD_NAME nano BOARD_CPU atmega328) add_arduino_executable(Arduino_Library test.cpp) # Find and link the Stepper library -find_arduino_library(stepper_lib stePpEr) # Library name is case-insensitive to the user +find_arduino_library(stepper_lib Stepper) link_arduino_library(Arduino_Library stepper_lib) # Find and link the Servo library - Custom implementation for many architectures, diff --git a/examples/platform-library/CMakeLists.txt b/examples/platform-library/CMakeLists.txt index 323457d..e4075a9 100644 --- a/examples/platform-library/CMakeLists.txt +++ b/examples/platform-library/CMakeLists.txt @@ -11,3 +11,6 @@ link_arduino_library(Platform_Library wire) find_arduino_library(spi SPI) link_arduino_library(Platform_Library spi) + +find_arduino_library(sd SD) +link_arduino_library(Platform_Library sd) diff --git a/examples/platform-library/platformLibrary.cpp b/examples/platform-library/platformLibrary.cpp index 5edbd05..9f1b989 100644 --- a/examples/platform-library/platformLibrary.cpp +++ b/examples/platform-library/platformLibrary.cpp @@ -1,6 +1,7 @@ #include #include #include +#include void setup() {