meta: add build system

This commit is contained in:
2026-05-02 12:52:32 +01:00
parent 2139fff047
commit 84bb6cc0aa
4 changed files with 64 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.31)
project(bshell C)
find_package(Python COMPONENTS Interpreter REQUIRED)
execute_process(
COMMAND ${Python_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py
OUTPUT_VARIABLE bshell_version)
file(GLOB_RECURSE bshell_sources
bshell/*.c
bshell/*.h)
message(STATUS "B Shell version: ${bshell_version}")
add_executable(bshell ${bshell_sources})
target_compile_definitions(bshell PUBLIC
BSHELL_VERSION="${bshell_version}")