Skip to content

Commit

Permalink
Make all libraries link mbed-application-profile-flags
Browse files Browse the repository at this point in the history
This makes all libraries link mbed-application-profile-flags instead
of mbed-core-flags/mbed-rtos-flags so that they build on correct
application profile, mbed-os or mbed-baremetal.
  • Loading branch information
ccli8 committed Dec 31, 2024
1 parent 053bcf4 commit 5feb822
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 37 deletions.
3 changes: 1 addition & 2 deletions connectivity/cellular/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ target_sources(mbed-cellular
target_link_libraries(mbed-cellular
PUBLIC
mbed-netsocket-api
mbed-core-flags
mbed-rtos-flags
mbed-application-profile-flags
mbed-randlib
)
2 changes: 1 addition & 1 deletion connectivity/drivers/802.15.4_RF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macro(create_mbed_802_15_4_target)
add_library(mbed-802.15.4-rf STATIC EXCLUDE_FROM_ALL)

# Nanostack drivers always require Mbed RTOS
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-core-flags mbed-rtos-flags)
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-application-profile-flags)

# For NanostackRfPhy.h
target_link_libraries(mbed-802.15.4-rf PUBLIC mbed-nanostack)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ add_library(mbed-bluenrg2 STATIC EXCLUDE_FROM_ALL

target_link_libraries(mbed-bluenrg2
PUBLIC
mbed-core-flags
mbed-application-profile-flags
mbed-ble
PRIVATE
mbed-rtos-flags)
)

# circular dependency between mbed-ble and the BlueNRG driver, because of the ble_cordio_get_hci_driver() implementation
target_link_libraries(mbed-ble PUBLIC mbed-bluenrg2)
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ add_library(mbed-bluenrg-ms STATIC EXCLUDE_FROM_ALL

target_link_libraries(mbed-bluenrg-ms
PUBLIC
mbed-core-flags
mbed-application-profile-flags
mbed-ble
PRIVATE
mbed-rtos-flags)
)


# circular dependency between mbed-ble and the BlueNRG driver, because of the ble_cordio_get_hci_driver() implementation
Expand Down
2 changes: 1 addition & 1 deletion connectivity/drivers/emac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ target_link_libraries(mbed-emac
PUBLIC
mbed-netsocket-api
PRIVATE
mbed-rtos-flags
mbed-application-profile-flags
)
2 changes: 1 addition & 1 deletion connectivity/drivers/wifi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ macro(create_mbed_wifi_target)

target_link_libraries(mbed-wifi
PUBLIC
mbed-rtos-flags
mbed-application-profile-flags
mbed-netsocket-api
)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_library(mbed-minimal-cyhal STATIC
wiced_filesystem.cpp)
target_include_directories(mbed-minimal-cyhal PUBLIC .)
target_link_libraries(mbed-minimal-cyhal PUBLIC
mbed-core-flags
mbed-application-profile-flags
mbed-cy-rtos-abstraction)

# This is needed in order to make cybsp_wifi.h include cycfg.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target_sources(mbed-wifi
target_link_libraries(mbed-wifi
PUBLIC
mbed-lwipstack
mbed-rtos-flags
mbed-application-profile-flags
)

if("DEVICE_EMAC=1" IN_LIST MBED_TARGET_DEFINITIONS)
Expand Down
2 changes: 1 addition & 1 deletion connectivity/libraries/mbed-coap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ target_compile_definitions(mbed-coap
target_link_libraries(mbed-coap
PUBLIC
mbed-nanostack-libservice
mbed-core-flags
mbed-application-profile-flags
mbed-randlib
)
2 changes: 1 addition & 1 deletion connectivity/libraries/ppp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ target_link_libraries(mbed-ppp
PUBLIC
mbed-netsocket-api
PRIVATE
mbed-rtos-flags
mbed-application-profile-flags
)
2 changes: 1 addition & 1 deletion connectivity/lwipstack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ target_link_libraries(mbed-lwipstack
mbed-ppp
mbed-randlib
PRIVATE
mbed-rtos-flags
mbed-application-profile-flags
)

2 changes: 1 addition & 1 deletion connectivity/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ target_compile_definitions(mbed-mbedtls
MBED_CONF_MBEDTLS_PRESENT=1
)

target_link_libraries(mbed-mbedtls PUBLIC mbed-core-flags)
target_link_libraries(mbed-mbedtls PUBLIC mbed-application-profile-flags)

# Link Mbed's PSA implementation on enabled
if(("FEATURE_EXPERIMENTAL_API=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
Expand Down
4 changes: 1 addition & 3 deletions connectivity/nanostack/mbed-mesh-api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ target_link_libraries(mbed-nanostack-mbed_mesh_api
mbed-nanostack-sal_stack
mbed-nanostack
mbed-netsocket-api
mbed-core-flags
PRIVATE
mbed-rtos-flags
mbed-application-profile-flags
)

# Since there are a lot of circular references between this library and mbed-netsocket-api,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ target_sources(mbed-nanostack-hal_mbed_cmsis_rtos

target_link_libraries(mbed-nanostack-hal_mbed_cmsis_rtos
PUBLIC
mbed-core-flags
mbed-application-profile-flags
mbed-randlib
mbed-nanostack-sal_stack-event_loop
mbed-nanostack-libservice
mbed-nanostack-sal_stack
PRIVATE
mbed-rtos-flags
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ target_sources(mbed-nanostack-sal_stack-event_loop

target_link_libraries(mbed-nanostack-sal_stack-event_loop
PUBLIC
mbed-core-flags
mbed-application-profile-flags
)
2 changes: 1 addition & 1 deletion connectivity/nanostack/sal-stack-nanostack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ target_include_directories(mbed-nanostack-sal_stack
target_link_libraries(mbed-nanostack-sal_stack
PUBLIC
mbed-nanostack-libservice
mbed-core-flags
mbed-application-profile-flags
mbed-nanostack-sal_stack-event_loop
mbed-randlib
mbed-mbedtls
Expand Down
2 changes: 1 addition & 1 deletion connectivity/netsocket/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ target_compile_definitions(mbed-netsocket-api

target_link_libraries(mbed-netsocket-api
PUBLIC
mbed-core-flags
mbed-application-profile-flags
mbed-mbedtls
mbed-nanostack-libservice
)
Expand Down
3 changes: 1 addition & 2 deletions connectivity/netsocket/tests/emac_test_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ target_sources(mbed-emac-test-utils PRIVATE
EmacTestNetworkStack.cpp)
target_include_directories(mbed-emac-test-utils PUBLIC .)
target_link_libraries(mbed-emac-test-utils PUBLIC
mbed-core-flags
mbed-rtos-flags
mbed-application-profile-flags
mbed-netsocket-api
mbed-nanostack-libservice
mbed-nanostack-hal_mbed_cmsis_rtos)
4 changes: 2 additions & 2 deletions drivers/usb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if("DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS)
include/usb/internal
)

target_link_libraries(mbed-usb PUBLIC mbed-core-flags)
target_link_libraries(mbed-usb PUBLIC mbed-application-profile-flags)

# USB Mass Storage Device library is separate because it pulls in a dependency on mbed-storage-blockdevice
add_library(mbed-usb-msd STATIC EXCLUDE_FROM_ALL
Expand All @@ -56,5 +56,5 @@ if("DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS)
include/usb/cdc_ecm
)

target_link_libraries(mbed-usb-cdc-ecm PUBLIC mbed-usb mbed-rtos-flags)
target_link_libraries(mbed-usb-cdc-ecm PUBLIC mbed-usb)
endif()
2 changes: 1 addition & 1 deletion features/frameworks/greentea-client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ target_sources(mbed-greentea
source/greentea_test_env.cpp
)

target_link_libraries(mbed-greentea PUBLIC mbed-core-flags)
target_link_libraries(mbed-greentea PUBLIC mbed-application-profile-flags)
2 changes: 1 addition & 1 deletion features/frameworks/mbed-greentea-io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

add_library(mbed-greentea-io STATIC EXCLUDE_FROM_ALL)
target_sources(mbed-greentea-io PRIVATE mbed_io.cpp)
target_link_libraries(mbed-greentea-io PUBLIC mbed-core-flags)
target_link_libraries(mbed-greentea-io PUBLIC mbed-application-profile-flags)
2 changes: 1 addition & 1 deletion features/frameworks/unity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ target_sources(mbed-unity
source/unity.c
)

target_link_libraries(mbed-unity PUBLIC mbed-core-flags mbed-utest)
target_link_libraries(mbed-unity PUBLIC mbed-application-profile-flags mbed-utest)
2 changes: 1 addition & 1 deletion features/frameworks/utest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ target_sources(mbed-utest
source/utest_types.cpp
)

target_link_libraries(mbed-utest PUBLIC mbed-core-flags mbed-unity)
target_link_libraries(mbed-utest PUBLIC mbed-application-profile-flags mbed-unity)
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ target_sources(mbed-psa
src/psa_hrng.c
)

target_link_libraries(mbed-psa PRIVATE mbed-core-flags)
target_link_libraries(mbed-psa PRIVATE mbed-application-profile-flags)
2 changes: 1 addition & 1 deletion platform/randlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ target_sources(mbed-randlib
target_link_libraries(mbed-randlib
PUBLIC
mbed-mbedtls
mbed-core-flags
mbed-application-profile-flags
)
2 changes: 1 addition & 1 deletion storage/blockdevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ target_sources(mbed-storage-blockdevice
source/SlicingBlockDevice.cpp
)

target_link_libraries(mbed-storage-blockdevice PUBLIC mbed-core-flags)
target_link_libraries(mbed-storage-blockdevice PUBLIC mbed-application-profile-flags)

0 comments on commit 5feb822

Please sign in to comment.