added rule to create feed_packet tool to CMakeLists.txt
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 13 Mar 2015 13:32:15 +0000 (14:32 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 13 Mar 2015 13:32:15 +0000 (14:32 +0100)
src/CMakeLists.txt

index b469bfd..6416546 100644 (file)
@@ -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)