Skip to content

Commit b7f1acf

Browse files
authored
Merge pull request #14428 from 0xc0170/cmake-fix-targets-labels
CMake targets: remove labels usage, not required anymore
2 parents 6a25287 + a0ee432 commit b7f1acf

File tree

8 files changed

+28
-43
lines changed

8 files changed

+28
-43
lines changed

targets/CMakeLists.txt

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,19 @@
22
# SPDX-License-Identifier: Apache-2.0
33
include(../tools/cmake/set_linker_script.cmake)
44

5-
if("Ambiq_Micro" IN_LIST MBED_TARGET_LABELS)
6-
add_subdirectory(TARGET_Ambiq_Micro)
7-
elseif("Analog_Devices" IN_LIST MBED_TARGET_LABELS)
8-
add_subdirectory(TARGET_Analog_Devices)
9-
elseif("ARM_FM" IN_LIST MBED_TARGET_LABELS)
10-
add_subdirectory(TARGET_ARM_FM)
11-
elseif("ARM_SSG" IN_LIST MBED_TARGET_LABELS)
12-
add_subdirectory(TARGET_ARM_SSG)
13-
elseif("Cypress" IN_LIST MBED_TARGET_LABELS)
14-
add_subdirectory(TARGET_Cypress)
15-
elseif("Freescale" IN_LIST MBED_TARGET_LABELS)
16-
add_subdirectory(TARGET_Freescale)
17-
elseif("GigaDevice" IN_LIST MBED_TARGET_LABELS)
18-
add_subdirectory(TARGET_GigaDevice)
19-
elseif("Maxim" IN_LIST MBED_TARGET_LABELS)
20-
add_subdirectory(TARGET_Maxim)
21-
elseif("NORDIC" IN_LIST MBED_TARGET_LABELS)
22-
add_subdirectory(TARGET_NORDIC)
23-
elseif("NUVOTON" IN_LIST MBED_TARGET_LABELS)
24-
add_subdirectory(TARGET_NUVOTON)
25-
elseif("NXP" IN_LIST MBED_TARGET_LABELS)
26-
add_subdirectory(TARGET_NXP)
27-
elseif("RENESAS" IN_LIST MBED_TARGET_LABELS)
28-
add_subdirectory(TARGET_RENESAS)
29-
elseif("Samsung" IN_LIST MBED_TARGET_LABELS)
30-
add_subdirectory(TARGET_Samsung)
31-
elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
32-
add_subdirectory(TARGET_Silicon_Labs)
33-
elseif("STM" IN_LIST MBED_TARGET_LABELS)
34-
add_subdirectory(TARGET_STM)
35-
elseif("TOSHIBA" IN_LIST MBED_TARGET_LABELS)
36-
add_subdirectory(TARGET_TOSHIBA)
37-
endif()
5+
add_subdirectory(TARGET_Ambiq_Micro EXCLUDE_FROM_ALL)
6+
add_subdirectory(TARGET_Analog_Devices EXCLUDE_FROM_ALL)
7+
add_subdirectory(TARGET_ARM_FM EXCLUDE_FROM_ALL)
8+
add_subdirectory(TARGET_ARM_SSG EXCLUDE_FROM_ALL)
9+
add_subdirectory(TARGET_Cypress EXCLUDE_FROM_ALL)
10+
add_subdirectory(TARGET_Freescale EXCLUDE_FROM_ALL)
11+
add_subdirectory(TARGET_GigaDevice EXCLUDE_FROM_ALL)
12+
add_subdirectory(TARGET_Maxim EXCLUDE_FROM_ALL)
13+
add_subdirectory(TARGET_NORDIC EXCLUDE_FROM_ALL)
14+
add_subdirectory(TARGET_NUVOTON EXCLUDE_FROM_ALL)
15+
add_subdirectory(TARGET_NXP EXCLUDE_FROM_ALL)
16+
add_subdirectory(TARGET_RENESAS EXCLUDE_FROM_ALL)
17+
add_subdirectory(TARGET_Samsung EXCLUDE_FROM_ALL)
18+
add_subdirectory(TARGET_Silicon_Labs EXCLUDE_FROM_ALL)
19+
add_subdirectory(TARGET_STM EXCLUDE_FROM_ALL)
20+
add_subdirectory(TARGET_TOSHIBA EXCLUDE_FROM_ALL)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ add_subdirectory(TARGET_MCU_K22F EXCLUDE_FROM_ALL)
99
add_subdirectory(TARGET_MCU_K64F EXCLUDE_FROM_ALL)
1010
add_subdirectory(middleware/wireless/TARGET_FRAMEWORK_5_3_3 EXCLUDE_FROM_ALL)
1111

12-
add_library(mbed-mcuxpresso-mcus INTERFACE)
12+
# We append freescale to the name as this should be unique but NXP/Freescale are in the tree covering
13+
# same vendor
14+
add_library(mbed-freescale-mcuxpresso-mcus INTERFACE)
1315

14-
target_include_directories(mbed-mcuxpresso-mcus
16+
target_include_directories(mbed-freescale-mcuxpresso-mcus
1517
INTERFACE
1618
api
1719
)
1820

19-
target_sources(mbed-mcuxpresso-mcus
21+
target_sources(mbed-freescale-mcuxpresso-mcus
2022
INTERFACE
2123
fsl_common.c
2224

@@ -35,4 +37,4 @@ target_sources(mbed-mcuxpresso-mcus
3537
api/sleep.c
3638
)
3739

38-
target_link_libraries(mbed-mcuxpresso-mcus INTERFACE mbed-freescale)
40+
target_link_libraries(mbed-freescale-mcuxpresso-mcus INTERFACE mbed-freescale)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ target_sources(mbed-k66f
7878

7979
mbed_set_linker_script(mbed-k66f ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
8080

81-
target_link_libraries(mbed-k66f INTERFACE mbed-mcuxpresso-mcus mbed-frdm-k66f)
81+
target_link_libraries(mbed-k66f INTERFACE mbed-freescale-mcuxpresso-mcus mbed-frdm-k66f)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ target_sources(mbed-k82f
9292

9393
mbed_set_linker_script(mbed-k82f ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
9494

95-
target_link_libraries(mbed-k82f INTERFACE mbed-mcuxpresso-mcus mbed-frdm-k82f)
95+
target_link_libraries(mbed-k82f INTERFACE mbed-freescale-mcuxpresso-mcus mbed-frdm-k82f)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL43Z/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ target_sources(mbed-kl43z
7070
${STARTUP_FILE}
7171
)
7272

73-
target_link_libraries(mbed-kl43z INTERFACE mbed-mcuxpresso-mcus)
73+
target_link_libraries(mbed-kl43z INTERFACE mbed-freescale-mcuxpresso-mcus)
7474

7575
mbed_set_linker_script(mbed-kl43z ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
7676

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW41Z/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ target_sources(mbed-kw41z
6666

6767
mbed_set_linker_script(mbed-kw41z ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
6868

69-
target_link_libraries(mbed-kw41z INTERFACE mbed-mcuxpresso-mcus mbed-framework-5-3-3 mbed-frdm-kw41z)
69+
target_link_libraries(mbed-kw41z INTERFACE mbed-freescale-mcuxpresso-mcus mbed-framework-5-3-3 mbed-frdm-kw41z)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K22F/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ target_sources(mbed-mcu-k22f
5555
drivers/fsl_wdog.c
5656
)
5757

58-
target_link_libraries(mbed-mcu-k22f INTERFACE mbed-mcuxpresso-mcus)
58+
target_link_libraries(mbed-mcu-k22f INTERFACE mbed-freescale-mcuxpresso-mcus)

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ target_sources(mbed-mcu-k64f
7575
${STARTUP_FILE}
7676
)
7777

78-
target_link_libraries(mbed-mcu-k64f INTERFACE mbed-mcuxpresso-mcus)
78+
target_link_libraries(mbed-mcu-k64f INTERFACE mbed-freescale-mcuxpresso-mcus)
7979

8080
mbed_set_linker_script(mbed-mcu-k64f ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
8181

0 commit comments

Comments
 (0)