diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b7081d..ce58489 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) \ No newline at end of file +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() \ No newline at end of file