From a8a038e72d6e30d9b3c75e9f68459e2ec42bd50c Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Fri, 13 Mar 2015 14:32:15 +0100 Subject: [PATCH] added rule to create feed_packet tool to CMakeLists.txt --- src/CMakeLists.txt | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b469bfd..6416546 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -124,3 +124,18 @@ target_link_libraries( # creates the install rule for the binary install(TARGETS ${TARGET} DESTINATION bin) + + +# create a library from the same files to feed into the linker for tools +add_library(lib_for_tools STATIC ${SOURCES}) + +# now create an executable for tools/feed_packet_data that depends on lib_for_tools +set(feed_packet_data_SOURCES tools/feed_packet_data.cpp) +add_executable(feed_packet_data ${feed_packet_data_SOURCES}) +target_link_libraries( + feed_packet_data + lib_for_tools + ${Boost_LIBRARIES} + ${I2NCOMMON_LIBRARIES} +) +# no install! install(TARGETS feed_packet_data DESTINATION bin) -- 1.7.1