CMake Build Script Clean Up
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 21 Nov 2018 07:40:12 +0000 (16:40 +0900)
committerGeunsik Lim <leemgs@users.noreply.github.com>
Thu, 22 Nov 2018 01:14:05 +0000 (10:14 +0900)
- Remove libcommon.a from the project
- Remove multi-binary support

Fixes two subissues of the three in #866

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
23 files changed:
CMakeLists.txt
debian/nnstreamer-dev.install
gst/nnstreamer/nnstreamer.c
gst/nnstreamer/tensor_common.h
gst/tensor_aggregator/tensor_aggregator.c
gst/tensor_converter/tensor_converter.c
gst/tensor_decoder/tensordec.c
gst/tensor_demux/gsttensordemux.c
gst/tensor_filter/tensor_filter.c
gst/tensor_merge/gsttensormerge.c
gst/tensor_mux/gsttensormux.c
gst/tensor_saveload/tensor_load.c
gst/tensor_sink/tensor_sink.c
gst/tensor_split/gsttensorsplit.c
gst/tensor_transform/tensor_transform.c
nnstreamer_example/custom_example_LSTM/CMakeLists.txt
nnstreamer_example/custom_example_average/CMakeLists.txt
nnstreamer_example/custom_example_opencv/CMakeLists.txt
nnstreamer_example/custom_example_passthrough/CMakeLists.txt
nnstreamer_example/custom_example_scaler/CMakeLists.txt
packaging/nnstreamer.spec
tests/CMakeLists.txt
tests/nnstreamer_tensors/tensors_test/CMakeLists.txt

index d8cfdaf..9b2bc68 100644 (file)
@@ -6,18 +6,8 @@ OPTION(ENABLE_TENSORFLOW_LITE "Enable tensorflow-lite support" ON)
 OPTION(ENABLE_TENSORFLOW "Enable tensorflow support" OFF)
 OPTION(ENABLE_MODEL_DOWNLOAD "Enable download the model files" ON)
 OPTION(INSTALL_EXAMPLE_APP "Install example applications" OFF)
-OPTION(SINGLE_BINARY "Generate a single binary for all nnstreamer elements" ON)
 OPTION(ENABLE_TEST "Enable tests" ON)
 
-IF(SINGLE_BINARY)
-       ADD_DEFINITIONS(-DSINGLE_BINARY)
-       MESSAGE(STATUS "The nnstreamer elements will be created as a single plugin binary.")
-       SET(CUSTOMFILTERDEP     nnstreamer)
-ELSE(SINGLE_BINARY)
-       MESSAGE(STATUS "The nnstreamer elements will be created as multple plugin binaries, one binary for one element. This is no more the standard method to release since nnstreamer 0.0.3.")
-       SET(CUSTOMFILTERDEP     tensor_filter)
-ENDIF(SINGLE_BINARY)
-
 SET(VERSION "0.0.3")
 ADD_DEFINITIONS(-DVERSION="${VERSION}")
 
@@ -63,12 +53,6 @@ ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror -fPIC -g -std=c89")
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall -Werror -fPIC -g -std=c++11")
 
-# Provide common data
-ADD_LIBRARY(common STATIC gst/nnstreamer/tensor_common.c)
-TARGET_LINK_LIBRARIES(common ${pkgs_LIBRARIES})
-TARGET_INCLUDE_DIRECTORIES(common PUBLIC ${pkgs_INCLUDE_DIRS})
-SET(pkgs_LIBRARIES ${pkgs_LIBRARIES} common)
-
 # Supported projects for the single binary
 SET(PROJECTS
        tensor_aggregator
@@ -109,53 +93,26 @@ IF(ENABLE_TENSORFLOW)
 ENDIF(ENABLE_TENSORFLOW)
 LIST(LENGTH FILTER_DEP FILTER_DEP_LEN)
 
-IF (SINGLE_BINARY)
-       ADD_LIBRARY(nnstreamerStatic STATIC gst/nnstreamer/nnstreamer.c ${OBJECTS} gst/nnstreamer/tensor_common.c)
-       SET_TARGET_PROPERTIES(nnstreamerStatic PROPERTIES OUTPUT_NAME nnstreamer)
-       TARGET_INCLUDE_DIRECTORIES(nnstreamerStatic PUBLIC ${pkgs_INCLUDE_DIRS})
-       TARGET_COMPILE_OPTIONS(nnstreamerStatic PUBLIC ${pkgs_CFLAGS_OTHER})
-
-       ADD_LIBRARY(nnstreamer SHARED gst/nnstreamer/nnstreamer.c ${OBJECTS})
-       TARGET_INCLUDE_DIRECTORIES(nnstreamer PUBLIC ${pkgs_INCLUDE_DIRS})
-       TARGET_COMPILE_OPTIONS(nnstreamer PUBLIC ${pkgs_CFLAGS_OTHER})
-       TARGET_LINK_LIBRARIES(nnstreamer ${pkgs_LIBRARIES} ${FILTER_LIB})
-
-       IF (FILTER_DEP_LEN GREATER 0)
-               ADD_DEPENDENCIES(nnstreamer ${FILTER_DEP})
-               ADD_DEPENDENCIES(nnstreamerStatic ${FILTER_DEP})
-       ENDIF (FILTER_DEP_LEN GREATER 0)
-
-       INSTALL(TARGETS nnstreamerStatic nnstreamer
-               RUNTIME DESTINATION ${EXEC_PREFIX}
-               LIBRARY DESTINATION ${GST_INSTALL_DIR}
-               ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-       )
-ELSE (SINGLE_BINARY)
-       FOREACH(PRJ IN LISTS PROJECTS)
-               ADD_LIBRARY(${PRJ}Static STATIC $<TARGET_OBJECTS:${PRJ}OBJ>)
-               SET_TARGET_PROPERTIES(${PRJ}Static PROPERTIES OUTPUT_NAME ${PRJ})
-               TARGET_INCLUDE_DIRECTORIES(${PRJ}Static PUBLIC ${pkgs_INCLUDE_DIRS})
-               TARGET_COMPILE_OPTIONS(${PRJ}Static PUBLIC ${pkgs_CFLAGS_OTHER})
-
-               ADD_LIBRARY(${PRJ} SHARED $<TARGET_OBJECTS:${PRJ}OBJ>)
-               TARGET_INCLUDE_DIRECTORIES(${PRJ} PUBLIC ${pkgs_INCLUDE_DIRS} ${NNSTREAMER_ADDITIONAL_INCDIR})
-               TARGET_COMPILE_OPTIONS(${PRJ} PUBLIC ${pkgs_CFLAGS_OTHER} ${NNSTREAMER_ADDITIONAL_FLAGS})
-               IF(PRJ STREQUAL "tensor_filter")
-                       TARGET_LINK_LIBRARIES(${PRJ} ${pkgs_LIBRARIES} ${FILTER_LIB})
-                       IF (FILTER_DEP_LEN GREATER 0)
-                               ADD_DEPENDENCIES(${PRJ} ${FILTER_DEP})
-                       ENDIF (FILTER_DEP_LEN GREATER 0)
-               ELSE(PRJ STREQUAL "tensor_filter")
-                       TARGET_LINK_LIBRARIES(${PRJ} ${pkgs_LIBRARIES})
-               ENDIF(PRJ STREQUAL "tensor_filter")
-
-               INSTALL(TARGETS ${PRJ}Static ${PRJ}
-                       RUNTIME DESTINATION ${EXEC_PREFIX}
-                       LIBRARY DESTINATION ${GST_INSTALL_DIR}
-                       ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-               )
-       ENDFOREACH(PRJ)
-ENDIF (SINGLE_BINARY)
+ADD_LIBRARY(nnstreamerStatic STATIC gst/nnstreamer/nnstreamer.c gst/nnstreamer/tensor_common.c ${OBJECTS})
+SET_TARGET_PROPERTIES(nnstreamerStatic PROPERTIES OUTPUT_NAME nnstreamer)
+TARGET_INCLUDE_DIRECTORIES(nnstreamerStatic PUBLIC ${pkgs_INCLUDE_DIRS})
+TARGET_COMPILE_OPTIONS(nnstreamerStatic PUBLIC ${pkgs_CFLAGS_OTHER})
+
+ADD_LIBRARY(nnstreamer SHARED gst/nnstreamer/nnstreamer.c gst/nnstreamer/tensor_common.c ${OBJECTS})
+TARGET_INCLUDE_DIRECTORIES(nnstreamer PUBLIC ${pkgs_INCLUDE_DIRS})
+TARGET_COMPILE_OPTIONS(nnstreamer PUBLIC ${pkgs_CFLAGS_OTHER})
+TARGET_LINK_LIBRARIES(nnstreamer ${pkgs_LIBRARIES} ${FILTER_LIB})
+
+IF (FILTER_DEP_LEN GREATER 0)
+       ADD_DEPENDENCIES(nnstreamer ${FILTER_DEP})
+       ADD_DEPENDENCIES(nnstreamerStatic ${FILTER_DEP})
+ENDIF (FILTER_DEP_LEN GREATER 0)
+
+INSTALL(TARGETS nnstreamerStatic nnstreamer
+       RUNTIME DESTINATION ${EXEC_PREFIX}
+       LIBRARY DESTINATION ${GST_INSTALL_DIR}
+       ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+)
 
 CONFIGURE_FILE(nnstreamer.pc.in nnstreamer.pc @ONLY)
 
@@ -172,10 +129,3 @@ INSTALL(FILES gst/nnstreamer/tensor_common.h gst/nnstreamer/tensor_filter_custom
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/nnstreamer.pc
        DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
        )
-
-# Custom plugins need to use common archive (static lib)
-INSTALL(TARGETS common
-       RUNTIME DESTINATION ${EXEC_PREFIX}
-       LIBRARY DESTINATION ${GST_INSTALL_DIR}
-       ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-       )
index 7f5617c..c8a68eb 100644 (file)
@@ -1,5 +1,4 @@
 /usr/include/nnstreamer/*.h
 /usr/lib/pkgconfig/*.pc
 /usr/lib/libnnstreamer.a
-/usr/lib/libcommon.a
 /usr/lib/libtensor_filter*.a
index 373b41e..383feda 100644 (file)
@@ -69,10 +69,6 @@ gst_nnstreamer_init (GstPlugin * plugin)
   return TRUE;
 }
 
-#ifndef SINGLE_BINARY
-#error SINGLE_BINARY must be defined
-#endif
-
 #ifndef PACKAGE
 #define PACKAGE "nnstreamer"
 #endif
index e9f26a5..4752e2a 100644 (file)
@@ -427,13 +427,8 @@ extern void gst_tensors_typefind_function (GstTypeFind * tf, gpointer pdata);
         gst_caps_new_simple ("other/tensorsave", NULL, NULL), NULL, NULL)); \
     } while (0)
 
-#ifdef SINGLE_BINARY
 #define NNSTREAMER_PLUGIN_INIT(name)   \
   gboolean G_PASTE(nnstreamer_export_, name) (GstPlugin * plugin)
-#else
-#define NNSTREAMER_PLUGIN_INIT(name)   \
-  static gboolean G_PASTE(G_PASTE(gst_, name), _plugin_init) (GstPlugin * plugin)
-#endif
 
 
 /**
index b06fed7..7cdc0f4 100644 (file)
@@ -1064,27 +1064,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_aggregator)
   return gst_element_register (plugin, "tensor_aggregator",
       GST_RANK_NONE, GST_TYPE_TENSOR_AGGREGATOR);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * @brief Definition for identifying tensor_aggregator plugin.
- *
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief Macro to define the entry point of the plugin.
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_aggregator,
-    "GStreamer plugin to aggregate tensor stream",
-    gst_tensor_aggregator_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "http://github.com/nnsuite/nnstreamer/");
-#endif
index a566808..f557211 100644 (file)
@@ -1029,27 +1029,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_converter)
   return gst_element_register (plugin, "tensor_converter",
       GST_RANK_NONE, GST_TYPE_TENSOR_CONVERTER);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * @brief Definition for identifying tensor_converter plugin.
- *
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief Macro to define the entry point of the plugin.
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_converter,
-    "GStreamer plugin to convert media types to tensors",
-    gst_tensor_converter_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index 4aec313..a2c7f4f 100644 (file)
@@ -796,25 +796,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_decoder)
   return gst_element_register (plugin, "tensor_decoder", GST_RANK_NONE,
       GST_TYPE_TENSORDEC);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * gstreamer looks for this structure to register tensor_decoder
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_decoder,
-    "Element to convert tensor to media stream",
-    gst_tensor_decoder_plugin_init,
-    VERSION, "LGPL", "nnstreamer", "http://github.com/nnsuite/nnstreamer/");
-#endif
index 57b0ef4..30d47b2 100644 (file)
@@ -606,25 +606,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_demux)
   return gst_element_register (plugin, "tensor_demux",
       GST_RANK_NONE, GST_TYPE_TENSOR_DEMUX);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief gstreamer looks for this structure to register tensor_demux
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_demux,
-    "tensor_demux",
-    gst_tensor_demux_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "http://github.com/nnsuite/nnstreamer/");
-#endif
index e90756a..7c1ff30 100644 (file)
@@ -1251,28 +1251,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_filter)
   return gst_element_register (plugin, "tensor_filter", GST_RANK_NONE,
       GST_TYPE_TENSOR_FILTER);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * @brief Definition for identifying tensor_filter plugin.
- *
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief Macro to define the entry point of the plugin.
- * gstreamer looks for this structure to register tensor_filter.
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_filter,
-    "GStreamer plugin to use general neural network frameworks as filters",
-    gst_tensor_filter_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index b0a2902..d602ed2 100644 (file)
@@ -908,25 +908,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_merge)
   return gst_element_register (plugin, "tensor_merge",
       GST_RANK_NONE, GST_TYPE_TENSOR_MERGE);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief gstreamer looks for this structure to register tensormerge
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_merge,
-    "tensor merge plugin",
-    gst_tensor_merge_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index 062e289..1811569 100644 (file)
@@ -619,25 +619,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_mux)
   return gst_element_register (plugin, "tensor_mux",
       GST_RANK_NONE, GST_TYPE_TENSOR_MUX);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief gstreamer looks for this structure to register tensormux
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_mux,
-    "tensor mux plugin",
-    gst_tensor_mux_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index 15a9078..9b92449 100644 (file)
@@ -322,27 +322,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_load)
   return gst_element_register (plugin, "tensor_load",
       GST_RANK_NONE, GST_TYPE_TENSOR_LOAD);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * gstreamer looks for this structure to register tensor_loads
- *
- * exchange the string 'Template tensor_load' with your tensor_load description
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_load,
-    "Load other/tensor_save and as other/tensor or other/tensors",
-    gst_tensor_load_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index 373f10a..1d3832b 100644 (file)
@@ -758,27 +758,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_sink)
   return gst_element_register (plugin, "tensor_sink",
       GST_RANK_NONE, GST_TYPE_TENSOR_SINK);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * @brief Definition for identifying tensor_sink plugin.
- *
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief Macro to define the entry point of the plugin.
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_sink,
-    "Sink element to handle tensor stream",
-    gst_tensor_sink_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer");
-#endif
index 8c76e28..b6d625e 100644 (file)
@@ -680,25 +680,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_split)
   return gst_element_register (plugin, "tensor_split",
       GST_RANK_NONE, GST_TYPE_TENSOR_SPLIT);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * @brief gstreamer looks for this structure to register tensorsplit
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_split,
-    "tensor split plugin",
-    gst_tensor_split_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer/");
-#endif
index eb487c9..1586135 100644 (file)
@@ -1532,25 +1532,3 @@ NNSTREAMER_PLUGIN_INIT (tensor_transform)
   return gst_element_register (plugin, "tensor_transform",
       GST_RANK_NONE, GST_TYPE_TENSOR_TRANSFORM);
 }
-
-#ifndef SINGLE_BINARY
-/**
- * PACKAGE: this is usually set by autotools depending on some _INIT macro
- * in configure.ac and then written into and defined in config.h, but we can
- * just set it ourselves here in case someone doesn't use autotools to
- * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
- */
-#ifndef PACKAGE
-#define PACKAGE "nnstreamer"
-#endif
-
-/**
- * gstreamer looks for this structure to register tensor_transforms
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-    GST_VERSION_MINOR,
-    tensor_transform,
-    "GStreamer plugin to transform tensor dimension or type",
-    gst_tensor_transform_plugin_init, VERSION, "LGPL", "nnstreamer",
-    "https://github.com/nnsuite/nnstreamer");
-#endif
index fb491a4..8f804da 100644 (file)
@@ -1,6 +1,6 @@
 ADD_LIBRARY(dummyLSTM SHARED dummy_LSTM.c)
 
-TARGET_LINK_LIBRARIES(dummyLSTM ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(dummyLSTM nnstreamer)
 
 INSTALL(TARGETS dummyLSTM
        RUNTIME DESTINATION ${EXEC_PREFIX}
index fc7cf50..aa3ce4f 100644 (file)
@@ -1,6 +1,6 @@
 ADD_LIBRARY(nnstreamer_customfilter_average SHARED nnstreamer_customfilter_example_average.c)
 
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_average ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_average nnstreamer)
 
 INSTALL(TARGETS nnstreamer_customfilter_average
        RUNTIME DESTINATION ${EXEC_PREFIX}
index 6f97c8d..2be045d 100644 (file)
@@ -1,11 +1,11 @@
 pkg_check_modules(opencv_pkg REQUIRED opencv)
 
 ADD_LIBRARY(nnstreamer_customfilter_opencv_scaler SHARED nnstreamer_customfilter_opencv_scaler.cc)
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_opencv_scaler ${opencv_pkg_LIBRARIES} ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_opencv_scaler ${opencv_pkg_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(nnstreamer_customfilter_opencv_scaler PUBLIC ${opencv_pkg_INCLUDE_DIRS})
 
 ADD_LIBRARY(nnstreamer_customfilter_opencv_average SHARED nnstreamer_customfilter_opencv_average.cc)
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_opencv_average ${opencv_pkg_LIBRARIES} ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_opencv_average ${opencv_pkg_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(nnstreamer_customfilter_opencv_average PUBLIC ${opencv_pkg_INCLUDE_DIRS})
 
 INSTALL(TARGETS nnstreamer_customfilter_opencv_scaler
index d5cade0..6d8f50a 100644 (file)
@@ -1,8 +1,8 @@
 ADD_LIBRARY(nnstreamer_customfilter_passthrough SHARED nnstreamer_customfilter_example_passthrough.c)
 ADD_LIBRARY(nnstreamer_customfilter_passthrough_variable SHARED nnstreamer_customfilter_example_passthrough_variable.c)
 
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_passthrough ${CUSTOMFILTERDEP})
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_passthrough_variable ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_passthrough nnstreamer)
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_passthrough_variable nnstreamer)
 
 INSTALL(TARGETS nnstreamer_customfilter_passthrough nnstreamer_customfilter_passthrough_variable
        RUNTIME DESTINATION ${EXEC_PREFIX}
index f8b3bfa..a495171 100644 (file)
@@ -1,10 +1,10 @@
 ADD_LIBRARY(nnstreamer_customfilter_scaler SHARED nnstreamer_customfilter_example_scaler.c)
 
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler nnstreamer)
 
 ADD_LIBRARY(nnstreamer_customfilter_scaler_allocator SHARED nnstreamer_customfilter_example_scaler_allocator.c)
 
-TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler_allocator ${CUSTOMFILTERDEP})
+TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler_allocator nnstreamer)
 
 INSTALL(TARGETS nnstreamer_customfilter_scaler nnstreamer_customfilter_scaler_allocator
        RUNTIME DESTINATION ${EXEC_PREFIX}
index 34109c3..0a09369 100644 (file)
@@ -141,7 +141,6 @@ mkdir -p %{buildroot}%{_datadir}/nnstreamer/unittest/
 cp -r result %{buildroot}%{_datadir}/nnstreamer/unittest/
 %endif
 
-install build/libcommon.a %{buildroot}%{_libdir}/
 install build/libnnstreamer.a %{buildroot}%{_libdir}/
 install build/gst/tensor_filter/*.a %{buildroot}%{_libdir}/
 
index 33347aa..7ff6139 100644 (file)
@@ -29,21 +29,21 @@ ADD_SUBDIRECTORY(nnstreamer_tensors/tensors_test)
 # Unit test for common
 ADD_EXECUTABLE(unittest_common common/unittest_common.cpp ${gtestSrc})
 TARGET_INCLUDE_DIRECTORIES(unittest_common PUBLIC ${pkgs_INCLUDE_DIRS} ${testpkgs_INCLUDE_DIRS} ${gtestInc})
-TARGET_LINK_LIBRARIES(unittest_common ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
+TARGET_LINK_LIBRARIES(unittest_common nnstreamer ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
 
 # Unit test using tensor_sink
 ADD_EXECUTABLE(unittest_sink nnstreamer_sink/unittest_sink.cpp ${gtestSrc})
 TARGET_INCLUDE_DIRECTORIES(unittest_sink PUBLIC ${pkgs_INCLUDE_DIRS} ${testpkgs_INCLUDE_DIRS} ${gtestInc})
-TARGET_LINK_LIBRARIES(unittest_sink ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
+TARGET_LINK_LIBRARIES(unittest_sink nnstreamer ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
 
 # Unit test uses this custom filter
 ADD_LIBRARY(nnscustom_framecounter SHARED nnstreamer_sink/nnscustom_framecounter.c)
-TARGET_LINK_LIBRARIES(nnscustom_framecounter ${CUSTOMFILTERDEP} glib-2.0)
+TARGET_LINK_LIBRARIES(nnscustom_framecounter nnstreamer glib-2.0)
 
 # Unit test for nnstreamer plugins
 ADD_EXECUTABLE(unittest_plugins nnstreamer_plugins/unittest_plugins.cpp ${gtestSrc})
 TARGET_INCLUDE_DIRECTORIES(unittest_plugins PUBLIC ${pkgs_INCLUDE_DIRS} ${testpkgs_INCLUDE_DIRS} ${gtestInc})
-TARGET_LINK_LIBRARIES(unittest_plugins ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
+TARGET_LINK_LIBRARIES(unittest_plugins nnstreamer ${pkgs_LIBRARIES} ${testpkgs_LIBRARIES} ${gtestLink})
 
 ADD_TEST(NAME unit_test
         COMMAND sh -c "GST_PLUGIN_PATH=${PROJECT_SOURCE_DIR}/build ssat ${CMAKE_CURRENT_SOURCE_DIR}")
index f96e598..5d55278 100644 (file)
@@ -1,21 +1,21 @@
 ADD_LIBRARY(testtensors SHARED gsttesttensors.c )
 ADD_LIBRARY(testtensorsStatic STATIC gsttesttensors.c)
 
-TARGET_LINK_LIBRARIES(testtensors ${pkgs_LIBRARIES})
+TARGET_LINK_LIBRARIES(testtensors ${pkgs_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(testtensors PUBLIC ${pkgs_INCLUDE_DIRS})
 TARGET_COMPILE_OPTIONS(testtensors PUBLIC ${pkgs_CFLAGS_OTHER})
 
-TARGET_LINK_LIBRARIES(testtensorsStatic ${pkgs_LIBRARIES})
+TARGET_LINK_LIBRARIES(testtensorsStatic ${pkgs_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(testtensorsStatic PUBLIC ${pkgs_INCLUDE_DIRS})
 TARGET_COMPILE_OPTIONS(testtensorsStatic PUBLIC ${pkgs_CFLAGS_OTHER})
 
 ADD_LIBRARY(tensorscheck SHARED gsttensorscheck.c )
 ADD_LIBRARY(tensorscheckStatic STATIC gsttensorscheck.c)
 
-TARGET_LINK_LIBRARIES(tensorscheck ${pkgs_LIBRARIES})
+TARGET_LINK_LIBRARIES(tensorscheck ${pkgs_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(tensorscheck PUBLIC ${pkgs_INCLUDE_DIRS})
 TARGET_COMPILE_OPTIONS(tensorscheck PUBLIC ${pkgs_CFLAGS_OTHER})
 
-TARGET_LINK_LIBRARIES(tensorscheckStatic ${pkgs_LIBRARIES})
+TARGET_LINK_LIBRARIES(tensorscheckStatic ${pkgs_LIBRARIES} nnstreamer)
 TARGET_INCLUDE_DIRECTORIES(tensorscheckStatic PUBLIC ${pkgs_INCLUDE_DIRS})
 TARGET_COMPILE_OPTIONS(tensorscheckStatic PUBLIC ${pkgs_CFLAGS_OTHER})