build: add support for disabling native command support
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
set(source_dirs
|
||||
ast compile parse parse/lex parse/syntax
|
||||
format runtime command line-editor)
|
||||
format runtime command)
|
||||
|
||||
if (bshell_interactive)
|
||||
set(source_dirs ${source_dirs} line-editor)
|
||||
endif ()
|
||||
|
||||
file(GLOB sources
|
||||
*.c
|
||||
@@ -15,15 +19,22 @@ endforeach (d)
|
||||
|
||||
add_library(bshell.runtime SHARED ${sources})
|
||||
|
||||
target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Io FX::Diagnostics)
|
||||
target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Io)
|
||||
|
||||
if (bshell_interactive)
|
||||
target_link_libraries(bshell.runtime FX::Term)
|
||||
endif ()
|
||||
|
||||
if (bshell_enable_native_commands)
|
||||
target_link_libraries(bshell.runtime FX::Diagnostics)
|
||||
endif ()
|
||||
|
||||
target_include_directories(bshell.runtime PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_compile_definitions(bshell.runtime PUBLIC
|
||||
BSHELL_VERSION="${bshell_version}"
|
||||
BSHELL_ENABLE_FLOATING_POINT=${bshell_enable_floating_point}
|
||||
BSHELL_ENABLE_NATIVE_COMMANDS=${bshell_enable_native_commands}
|
||||
BSHELL_INTERACTIVE=${bshell_interactive}
|
||||
BSHELL_VERBOSE=${bshell_verbose})
|
||||
|
||||
install(TARGETS bshell.runtime)
|
||||
|
||||
Reference in New Issue
Block a user