From 8152361cdd40660cac9c8df75de89ede863fb14a Mon Sep 17 00:00:00 2001 From: Ian Scott Date: Sun, 1 Dec 2024 14:00:13 -0700 Subject: [PATCH] Fix build --- sw/CMakeLists.txt | 6 ------ sw/ne2000/CMakeLists.txt | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/sw/CMakeLists.txt b/sw/CMakeLists.txt index 454d8af..74ab266 100644 --- a/sw/CMakeLists.txt +++ b/sw/CMakeLists.txt @@ -315,15 +315,9 @@ endfunction() function(build_ne2k TARGET_NAME MULTIFW) config_target(${TARGET_NAME} ${MULTIFW}) pico_set_program_name(${TARGET_NAME} "picogus-ne2k") - # set(USB_JOYSTICK FALSE) - # set(PICO_BOARD PICO_W) # For now, until USB Dongle - # set(PICO_BOARD picow-fast) - #set(PICO_CYW43_SUPPORTED "1") - #pico_register_common_scope_var(PICO_CYW43_SUPPORTED) target_compile_definitions(${TARGET_NAME} PRIVATE NE2000=1 PICOW=1 - # CYW43_RESOURCE_ATTRIBUTE="__in_flash()" CYW43_CONFIG_FILE="cyw43_firmware.h" CYW43_PIO_CLOCK_DIV_INT=3 ) diff --git a/sw/ne2000/CMakeLists.txt b/sw/ne2000/CMakeLists.txt index 615c0f7..2aa78cd 100644 --- a/sw/ne2000/CMakeLists.txt +++ b/sw/ne2000/CMakeLists.txt @@ -17,18 +17,13 @@ target_sources(ne2000 INTERFACE target_link_libraries(ne2000 INTERFACE pico_cyw43_arch_none - # pico_cyw43_arch_poll ) -# target_compile_definitions(pico_cyw43_arch_poll_headers INTERFACE -# CYW43_LWIP=0 -# ) -# target_compile_definitions(ne2000 INTERFACE -# CYW43_LWIP=0 -# ) -target_compile_definitions(pico_cyw43_arch_none_headers INTERFACE - PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -) -target_compile_definitions(ne2000 INTERFACE - # PICO_CYW43_ARCH_POLL=1 - PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -) + +if(PROJECT_TYPE STREQUAL "NE2K") + target_compile_definitions(pico_cyw43_arch_none_headers INTERFACE + PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 + ) + target_compile_definitions(ne2000 INTERFACE + PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 + ) +endif()