fix: add examples to cmake

This commit is contained in:
2025-11-18 22:03:04 +01:00
parent 8a7cd27875
commit 726c49b407

View File

@@ -20,4 +20,22 @@ target_include_directories(native_invoker_lib
set(BLACKBASE_BUILD_TESTS OFF CACHE BOOL "Disable building tests for blackbase")
add_subdirectory(vendor/blackbase)
target_link_libraries(native_invoker_lib PUBLIC blackbase)
target_link_libraries(native_invoker_lib PUBLIC blackbase)
file(GLOB NATIVE_INVOKER_EXAMPLES
examples/*.cpp
)
foreach(EXAMPLE_SOURCE ${NATIVE_INVOKER_EXAMPLES})
get_filename_component(EXAMPLE_NAME ${EXAMPLE_SOURCE} NAME_WE)
add_library(${EXAMPLE_NAME} SHARED ${EXAMPLE_SOURCE})
target_include_directories(${EXAMPLE_NAME}
PUBLIC
include
)
target_compile_definitions(${EXAMPLE_NAME}
PRIVATE
FXN_IMPORTS
)
endforeach()