Skip to content

Commit 49f4bea

Browse files
committed
fix(mouse): rename builtin Mouse library to Mouse_STM32 to avoid conflict
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com> Rename and update includes for the builtin STM32 mouse library to `Mouse_STM32` to avoid name conflicts with the official Arduino `Mouse` library
1 parent 1eafe69 commit 49f4bea

File tree

8 files changed

+34
-34
lines changed

8 files changed

+34
-34
lines changed

libraries/Mouse/CMakeLists.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# v3.21 implemented semantic changes regarding $<TARGET_OBJECTS:...>
2+
# See https://cmake.org/cmake/help/v3.21/command/target_link_libraries.html#linking-object-libraries-via-target-objects
3+
cmake_minimum_required(VERSION 3.21)
4+
5+
add_library(Mouse_STM32 INTERFACE)
6+
add_library(Mouse_STM32_usage INTERFACE)
7+
8+
target_include_directories(Mouse_STM32_usage INTERFACE
9+
src
10+
)
11+
12+
13+
target_link_libraries(Mouse_STM32_usage INTERFACE
14+
base_config
15+
)
16+
17+
target_link_libraries(Mouse_STM32 INTERFACE Mouse_STM32_usage)
18+
19+
20+
21+
add_library(Mouse_STM32_bin OBJECT EXCLUDE_FROM_ALL
22+
src/Mouse_STM32.cpp
23+
)
24+
target_link_libraries(Mouse_STM32_bin PUBLIC Mouse_STM32_usage)
25+
26+
target_link_libraries(Mouse_STM32 INTERFACE
27+
Mouse_STM32_bin
28+
$<TARGET_OBJECTS:Mouse_STM32_bin>
29+
)
30+
File renamed without changes.

libraries/Mouse/examples/ButtonMouseControl/ButtonMouseControl.ino renamed to libraries/Mouse_STM32/examples/ButtonMouseControl/ButtonMouseControl.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
https://www.arduino.cc/en/Tutorial/BuiltInExamples/ButtonMouseControl
2424
*/
2525

26-
#include "Mouse.h"
26+
#include "Mouse_STM32.h"
2727

2828
// set pin numbers for the five buttons:
2929
const int upButton = 2;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Datatypes (KEYWORD1)
77
#######################################
88

9-
Mouse KEYWORD1
9+
Mouse_STM32 KEYWORD1
1010

1111
#######################################
1212
# Methods and Functions (KEYWORD2)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name=Mouse
1+
name=Mouse_STM32
22
version=1.1.0
33
author=Arduino, stm32duino
44
maintainer=stm32duino
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2020
*/
2121

22-
#include "Mouse.h"
22+
#include "Mouse_STM32.h"
2323

2424
#if defined(USBCON)
2525
#include "usbd_hid_composite_if.h"

0 commit comments

Comments
 (0)