fix: add examples to cmake
This commit is contained in:
@@ -20,4 +20,22 @@ target_include_directories(native_invoker_lib
|
|||||||
set(BLACKBASE_BUILD_TESTS OFF CACHE BOOL "Disable building tests for blackbase")
|
set(BLACKBASE_BUILD_TESTS OFF CACHE BOOL "Disable building tests for blackbase")
|
||||||
add_subdirectory(vendor/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()
|
||||||
Reference in New Issue
Block a user