set(source_dirs ast compile parse parse/lex parse/syntax format runtime command) file(GLOB sources *.c *.h) foreach (d ${source_dirs}) file(GLOB d_sources ${d}/*.c ${d}/*.h) set(sources ${sources} ${d_sources}) endforeach (d) message(STATUS ${sources}) add_library(bshell.runtime SHARED ${sources}) target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Term) target_include_directories(bshell.runtime PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) target_compile_definitions(bshell.runtime PUBLIC BSHELL_VERSION="${bshell_version}")