File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ option(ENABLE_DPDK "Enable DPDK" OFF)
6767option (ENABLE_LIBNUMA "Enable LibNUMA" OFF )
6868option (ENABLE_EXPORT "Enable PIC and export libraries" OFF )
6969option (ENABLE_TRX_DRIVER "Enable Amarisoft TRX driver library" OFF )
70+ option (ENABLE_PLUGINS "Compile plugins in the plugin folder" OFF )
7071option (BUILD_TESTS "Compile tests" ON )
7172option (ENABLE_GPROF "Enable gprof" OFF )
7273option (USE_PHY_TESTVECTORS "Enable testvector PHY tests" ON )
@@ -439,6 +440,22 @@ if (BUILD_TESTS)
439440 add_subdirectory (tests/benchmarks)
440441endif (BUILD_TESTS)
441442
443+ if (ENABLE_PLUGINS)
444+ # Discover all subdirectories in the plugin directory (but not recursively)
445+ file (GLOB SUBDIRS RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR} /plugins/*)
446+
447+ # Loop through each plugin subdirectory
448+ foreach (subdir ${SUBDIRS} )
449+ # Check if it's a directory and contains a CMakeLists.txt file
450+ if (IS_DIRECTORY ${CMAKE_SOURCE_DIR} /${subdir} AND EXISTS ${CMAKE_SOURCE_DIR} /${subdir} /CMakeLists.txt)
451+ message (STATUS "Adding subdirectory: ${subdir} " )
452+ add_subdirectory (${subdir} )
453+ endif ()
454+ endforeach ()
455+ endif ()
456+
457+
458+
442459########################################################################
443460# Export (selected) libraries
444461########################################################################
You can’t perform that action at this time.
0 commit comments