feat: add libffi cmake dependency
This commit is contained in:
@@ -3,6 +3,7 @@ project(fz-lang
|
|||||||
LANGUAGES C)
|
LANGUAGES C)
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
add_compile_options(-Wall -Wextra -Werror=implicit-function-declaration)
|
add_compile_options(-Wall -Wextra -Werror=implicit-function-declaration)
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
@@ -11,6 +12,13 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
FetchContent_Declare(ffi
|
||||||
|
GIT_REPOSITORY "https://git.samsonium.dev/samsonium/libffi.git"
|
||||||
|
GIT_TAG "main"
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(ffi)
|
||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
add_executable(fzc
|
add_executable(fzc
|
||||||
@@ -56,6 +64,8 @@ add_executable(fz
|
|||||||
src/vm/fzl_vm_debug.c
|
src/vm/fzl_vm_debug.c
|
||||||
src/vm/main.c)
|
src/vm/main.c)
|
||||||
|
|
||||||
|
target_link_libraries(fz PRIVATE ffi_static dl)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========== Tests ==========
|
# ========== Tests ==========
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user