cmake_minimum_required(VERSION 3.31)
project(bshell C)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if (NOT DEFINED bshell_interactive)
	set(bshell_interactive 1)
endif ()

find_package(Python COMPONENTS Interpreter REQUIRED)
find_package(FX REQUIRED COMPONENTS
	fx.runtime
	fx.collections
	fx.term)

execute_process(
	COMMAND ${Python_EXECUTABLE}
		${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py
	OUTPUT_VARIABLE bshell_version)
message(STATUS "B Shell version: ${bshell_version}")

add_subdirectory(bshell)
add_subdirectory(bshell.runtime)
add_subdirectory(bshell.core)
