feat: add libffi cmake dependency

This commit is contained in:
samsonium
2026-10-28 00:31:09 +03:00
parent b24cefee96
commit 70bf63e2ea
+10
View File
@@ -3,6 +3,7 @@ project(fz-lang
LANGUAGES C)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(BUILD_SHARED_LIBS OFF)
add_compile_options(-Wall -Wextra -Werror=implicit-function-declaration)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -11,6 +12,13 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
endif()
include_directories(include)
include(FetchContent)
FetchContent_Declare(ffi
GIT_REPOSITORY "https://git.samsonium.dev/samsonium/libffi.git"
GIT_TAG "main"
)
FetchContent_MakeAvailable(ffi)
# Compiler
add_executable(fzc
@@ -56,6 +64,8 @@ add_executable(fz
src/vm/fzl_vm_debug.c
src/vm/main.c)
target_link_libraries(fz PRIVATE ffi_static dl)
#
# ========== Tests ==========
#