From: Christian Herdtweck Date: Fri, 13 Mar 2015 13:32:15 +0000 (+0100) Subject: added rule to create feed_packet tool to CMakeLists.txt X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=a8a038e72d6e30d9b3c75e9f68459e2ec42bd50c;p=pingcheck added rule to create feed_packet tool to CMakeLists.txt --- 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)