Files
bs_explorer/modules/drivers/CMakeLists.txt
François 78f6bb9b34 digilent: add driver skeleton + CMake option BS_ENABLE_DIGILENT
Stub Digilent JTAG-SMT backend, off by default. Wiring only: option,
conditional sources, dl link, drivers_list registration. Detect()
returns 0 for now; dlopen + real implementation in follow-up commits.
2026-05-23 11:06:43 +02:00

25 lines
735 B
CMake

set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
file(GLOB MAIN_SOURCES "*.c")
file(GLOB_RECURSE JLINK_SOURCES "jlink_jtag/*.c")
file(GLOB_RECURSE FTDI_SOURCES "ftdi_jtag/*.c")
file(GLOB_RECURSE GPIO_SOURCES "linux_gpio_jtag/*.c")
set(DIGILENT_SOURCES "")
if(BS_ENABLE_DIGILENT)
file(GLOB_RECURSE DIGILENT_SOURCES "digilent_jtag/*.c")
add_compile_definitions(BS_ENABLE_DIGILENT)
endif()
include_directories(${DIR_MODULES})
include_directories(${DIR_LIBS})
add_compile_definitions(FTD2XX_STATIC)
add_compile_definitions(FTDILIB)
add_library(drivers ${MAIN_SOURCES} ${FTDI_SOURCES} ${GPIO_SOURCES} ${JLINK_SOURCES} ${DIGILENT_SOURCES})
if(BS_ENABLE_DIGILENT)
target_link_libraries(drivers PUBLIC ${CMAKE_DL_LIBS})
endif()