Add examples folder
This commit is contained in:
parent
19a2055385
commit
98c3225f86
2 changed files with 11 additions and 0 deletions
|
|
@ -16,3 +16,5 @@ add_subdirectory(libs)
|
|||
add_library(psemek todo.md)
|
||||
target_link_libraries(psemek INTERFACE ${PSEMEK_LIBRARIES})
|
||||
set_target_properties(psemek PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_subdirectory(examples)
|
||||
|
|
|
|||
9
examples/CMakeLists.txt
Normal file
9
examples/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
file(GLOB PSEMEK_EXAMPLES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*")
|
||||
list(REMOVE_ITEM PSEMEK_EXAMPLES "CMakeLists.txt")
|
||||
|
||||
foreach(example ${PSEMEK_EXAMPLES})
|
||||
get_filename_component(TARGET_NAME "${example}" NAME_WLE)
|
||||
set(TARGET_NAME psemek-${TARGET_NAME})
|
||||
add_executable(${TARGET_NAME} ${example})
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC psemek)
|
||||
endforeach()
|
||||
Loading…
Add table
Reference in a new issue