add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/lwproctrace.pb-c.c ${CMAKE_CURRENT_BINARY_DIR}/src/lwproctrace.pb-c.h DEPENDS ${CMAKE_SOURCE_DIR}/lwproctrace.proto COMMAND protoc-c --proto_path ${CMAKE_SOURCE_DIR} --c_out ${CMAKE_CURRENT_BINARY_DIR}/src lwproctrace.proto ) add_library( lwptev STATIC include/liblwptev/proc_begin.h include/liblwptev/proc_end.h src/cleaner.c src/cleaner.h src/event.c src/event.h src/macros.h src/proc_begin.c src/proc_end.c src/stringlist.c src/stringlist.h src/symlink.c src/symlink.h src/timing.c src/timing.h ${CMAKE_CURRENT_BINARY_DIR}/src/lwproctrace.pb-c.c ${CMAKE_CURRENT_BINARY_DIR}/src/lwproctrace.pb-c.h ) target_include_directories( lwptev PUBLIC include PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src ) target_link_libraries( lwptev PUBLIC -lprotobuf-c )