chore: Add examples to CMake as opt-in targets
This commit is contained in:
parent
9a7629459e
commit
240a4f2f1a
@ -30,3 +30,5 @@ endif()
|
|||||||
|
|
||||||
install(TARGETS minitar DESTINATION lib)
|
install(TARGETS minitar DESTINATION lib)
|
||||||
install(FILES minitar.h DESTINATION include)
|
install(FILES minitar.h DESTINATION include)
|
||||||
|
|
||||||
|
add_subdirectory(examples)
|
5
examples/CMakeLists.txt
Normal file
5
examples/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
add_executable(list EXCLUDE_FROM_ALL list.c)
|
||||||
|
target_link_libraries(list PRIVATE minitar)
|
||||||
|
|
||||||
|
add_executable(untar EXCLUDE_FROM_ALL untar.c)
|
||||||
|
target_link_libraries(untar PRIVATE minitar)
|
Loading…
Reference in New Issue
Block a user