makes compilation of the network driver depend on netxduo being built

This commit is contained in:
2026-03-21 18:19:45 +01:00
parent fdf477044f
commit c98ac25ca6

View File

@@ -35,18 +35,24 @@ target_link_libraries(moonlight_platform_common PUBLIC
c
threadx)
add_library(moonlight_network_driver OBJECT
${MOONLIGHT_SRC_DIR}/mnrs_network_driver.c)
target_link_libraries(moonlight_network_driver PUBLIC
moonlight_platform_defaults
c
threadx
netxduo)
if(DEFINED NETXDUO_CUSTOM_PORT)
add_library(moonlight_network_driver OBJECT
${MOONLIGHT_SRC_DIR}/mnrs_network_driver.c)
target_link_libraries(moonlight_network_driver PUBLIC
moonlight_platform_defaults
c
threadx
netxduo)
endif()
function(target_add_moonlight_platform TARGET)
target_link_libraries(${TARGET} PRIVATE moonlight_platform_common)
endfunction()
function(target_add_moonlight_network_driver TARGET)
if(NOT TARGET moonlight_network_driver)
message(FATAL_ERROR "moonlight_network_driver requires netxduo to be available in this build")
endif()
target_link_libraries(${TARGET} PRIVATE moonlight_network_driver)
endfunction()