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.
35 lines
1.2 KiB
CMake
35 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(BoundaryScanExplorer)
|
|
|
|
# Optional backends. Off by default: no proprietary runtime dependency.
|
|
option(BS_ENABLE_DIGILENT
|
|
"Enable Digilent JTAG-SMT* backend (dlopen libdjtg.so / libdmgr.so at runtime; requires Adept Runtime installed)"
|
|
OFF)
|
|
|
|
# script and jtag_core must be the last linked archive for the application to compile
|
|
set(BS_MODULES script jtag_core)
|
|
set(DIR_MODULES ${CMAKE_SOURCE_DIR}/modules)
|
|
set(DIR_LIBS ${CMAKE_SOURCE_DIR}/libs)
|
|
|
|
# We dive into submodules
|
|
file(GLOB MODULES_DIRS RELATIVE ${DIR_MODULES} ${DIR_MODULES}/*)
|
|
foreach(module ${MODULES_DIRS})
|
|
set(module_path "${DIR_MODULES}/${module}")
|
|
|
|
# checks if it is a sub-directory and if it contains a cmake file
|
|
if(IS_DIRECTORY ${module_path} AND EXISTS "${module_path}/CMakeLists.txt")
|
|
message(STATUS "Submodule : ${module}")
|
|
# already existing modules are not included in the list
|
|
if(NOT ${module} IN_LIST BS_MODULES)
|
|
list(APPEND BS_MODULES ${module})
|
|
endif()
|
|
# We'll compile the module
|
|
add_subdirectory(modules/${module})
|
|
else()
|
|
message(STATUS "Ignored : ${module}")
|
|
endif()
|
|
endforeach()
|
|
|
|
add_subdirectory(bs)
|