1set(SOURCES 2 fwk_platform.c 3 fwk_platform_flash.c 4) 5 6add_library(${CONNFWK_PLATFORM_LIB} ${SOURCES}) 7 8# Making those includes PUBLIC will share them to the other targets linking this lib 9target_include_directories(${CONNFWK_PLATFORM_LIB} 10 PUBLIC 11 ${CMAKE_CURRENT_SOURCE_DIR}/../include 12 ${CMAKE_CURRENT_SOURCE_DIR} 13 configs 14) 15 16# Get common configs from the connfwk-config interface 17target_link_libraries(${CONNFWK_PLATFORM_LIB} 18 PRIVATE 19 connfwk-config 20 connfwk-platform-${CONNFWK_PLATFORM_FAMILY} 21 PUBLIC 22 ${CONNFWK_MCUX_SDK_LIB} 23) 24 25if(PROJECT_IS_TOP_LEVEL) 26 connfwk_target_set_linker_script(${CONNFWK_PLATFORM_LIB} PUBLIC ${CONNFWK_PLATFORM_LINKER_FILE}) 27 # Rebuild executables if the linker script is changed 28 set_target_properties(connfwk-config PROPERTIES INTERFACE_LINK_DEPENDS ${CONNFWK_PLATFORM_LINKER_FILE}) 29 connfwk_target_generate_map_file(${CONNFWK_PLATFORM_LIB} PUBLIC ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<TARGET_PROPERTY:NAME>.map) 30endif() 31