minitar/examples/CMakeLists.txt
apio 7339aeeae5
chore: Add platform-specific example targets
Someone might want to build only the examples that work on non-POSIX, or the ones that work on POSIX.
2023-02-05 14:33:59 +01:00

12 lines
431 B
CMake

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)
add_executable(pack EXCLUDE_FROM_ALL pack.c)
target_link_libraries(pack PRIVATE minitar)
add_custom_target(examples DEPENDS list untar pack)
add_custom_target(examples-posix DEPENDS list untar pack)
add_custom_target(examples-windows DEPENDS list)