The driver dlopen's libdjtg/libdmgr and degrades to "no probe" if they're absent, so building it in has no cost or dependency. BS_ENABLE_DIGILENT now defaults ON on UNIX (needs <dlfcn.h>); disable with -DBS_ENABLE_DIGILENT=OFF. Docs updated; also fixes the quartiq license note in CLAUDE.md (MIT, not BSD-2).
42 lines
1.5 KiB
CMake
42 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(BoundaryScanExplorer)
|
|
|
|
# Digilent JTAG-SMT* backend. The driver dlopen's libdjtg/libdmgr at
|
|
# runtime and degrades to "no probe" if they're absent, so building it
|
|
# in costs nothing — default ON. Needs <dlfcn.h>, so UNIX only.
|
|
if(UNIX)
|
|
set(BS_DIGILENT_DEFAULT ON)
|
|
else()
|
|
set(BS_DIGILENT_DEFAULT OFF)
|
|
endif()
|
|
option(BS_ENABLE_DIGILENT
|
|
"Enable Digilent JTAG-SMT* backend (dlopen libdjtg.so / libdmgr.so at runtime; Adept Runtime only needed to actually use such a probe)"
|
|
${BS_DIGILENT_DEFAULT})
|
|
|
|
# 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)
|