summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-25 20:56:55 +0000
committerpeter <peter@pmikkelsen.com>2026-08-25 20:56:55 +0000
commit86a65e695b9dc1fb7a20094204339f5bf168fb92 (patch)
treec4ab839a70c830097103d33797fedf01261d1800 /CMakeLists.txt
parent956cfb9ac26f44d05ffc446f30f84174865685a4 (diff)
Start working on modules, including a built-in "boot" module
FossilOrigin-Name: 4829dbeb2071fe0be41ded66a61ba2e156119a47def8a23415b8227a00d53ce7
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f59b019..d3450d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,13 +48,25 @@ target_link_options(common INTERFACE
)
add_library(aplwc
+ ${CMAKE_CURRENT_BINARY_DIR}/generated_headers/boot.h
src/lib/eval.c
src/lib/main.c
src/lib/memory.c
+ src/lib/module.c
src/lib/string.c
src/lib/syntax.c
)
target_link_libraries(aplwc PRIVATE common)
+target_include_directories(aplwc PRIVATE
+ "${CMAKE_CURRENT_BINARY_DIR}/generated_headers/"
+)
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated_headers/boot.h"
+ COMMAND xxd -i -n boot_src "${CMAKE_CURRENT_SOURCE_DIR}/src/lib/boot.aplwc" "${CMAKE_CURRENT_BINARY_DIR}/generated_headers/boot.h"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/lib/boot.aplwc"
+ COMMENT "Generate boot.h from boot.aplwc"
+)
add_executable(aplwc-repl
src/bin/main.c