zephyr/cmake/modules/Platform/Zephyr.cmake
Luca Burelli f61b003b07 cmake: conditionally enable shared library support
When CONFIG_LLEXT is enabled, the Zephyr platform needs to enable dynamic
library support. This is done by setting the `TARGET_SUPPORTS_SHARED_LIBS`
property to `TRUE` in the global property scope.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-08 09:04:32 +02:00

14 lines
380 B
CMake

# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2024, Arduino SA
# Perform the same initialization as the Generic platform, then enable
# dynamic library support if CONFIG_LLEXT is enabled.
include(Platform/Generic)
# Enable dynamic library support when CONFIG_LLEXT is enabled.
if(CONFIG_LLEXT)
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS true)
endif()