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.
25 lines
735 B
CMake
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()
|