include add_subdirectory for STK projects

This commit is contained in:
swang251-MB
2021-09-18 13:40:34 -04:00
parent 367893bf50
commit f00e38611c
6 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
project(examples)
file(GLOB EXAMPLE_SRC "./*.cpp")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}")
foreach(src ${EXAMPLE_SRC})
get_filename_component(src_bin ${src} NAME_WE)
add_executable(${src_bin} ${src})
target_link_libraries(${src_bin} PUBLIC stk)
endforeach()