OPTION(INSTALL_EXAMPLE_APP "Install example applications" OFF)
OPTION(ENABLE_TEST "Enable tests" ON)
+IF(INSTALL_EXAMPLE_APP)
+ IF(EXAMPLE_EXEC_PREFIX)
+ MESSAGE("Example application will be installed to ${EXAMPLE_EXEC_PREFIX}")
+ ELSE(EXAMPLE_EXEC_PREFIX)
+ SET(EXAMPLE_EXEC_PREFIX /usr/lib/nnstreamer/bin/)
+ ENDIF(EXAMPLE_EXEC_PREFIX)
+ENDIF(INSTALL_EXAMPLE_APP)
+
SET(VERSION "0.0.3")
ADD_DEFINITIONS(-DVERSION="${VERSION}")
TARGET_LINK_LIBRARIES(dummyRNN nnstreamer)
INSTALL(TARGETS dummyRNN
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
TARGET_LINK_LIBRARIES(nnstreamer_customfilter_average nnstreamer)
INSTALL(TARGETS nnstreamer_customfilter_average
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
TARGET_INCLUDE_DIRECTORIES(nnstreamer_customfilter_opencv_average PUBLIC ${opencv_pkg_INCLUDE_DIRS})
INSTALL(TARGETS nnstreamer_customfilter_opencv_scaler
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
INSTALL(TARGETS nnstreamer_customfilter_opencv_average
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
TARGET_LINK_LIBRARIES(nnstreamer_customfilter_passthrough_variable nnstreamer)
INSTALL(TARGETS nnstreamer_customfilter_passthrough nnstreamer_customfilter_passthrough_variable
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler_allocator nnstreamer)
INSTALL(TARGETS nnstreamer_customfilter_scaler nnstreamer_customfilter_scaler_allocator
- RUNTIME DESTINATION ${EXEC_PREFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
TARGET_COMPILE_OPTIONS(nnstreamer_example_cam PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS nnstreamer_example_cam RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS nnstreamer_example_cam RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
TARGET_COMPILE_OPTIONS(nnstreamer_example_decoder_image_labelling PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS nnstreamer_example_decoder_image_labelling RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS nnstreamer_example_decoder_image_labelling RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
TARGET_COMPILE_OPTIONS(nnstreamer_example_filter PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS nnstreamer_example_filter RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS nnstreamer_example_filter RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
TARGET_COMPILE_OPTIONS(${EXAMPLE_APP_NAME} PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS ${EXAMPLE_APP_NAME} RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS ${EXAMPLE_APP_NAME} RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
TARGET_COMPILE_OPTIONS(nnstreamer_example_object_detection PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS nnstreamer_example_object_detection RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS nnstreamer_example_object_detection RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
+ INSTALL(FILES get_model.sh gst-launch-object-detection.sh DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
TARGET_COMPILE_OPTIONS(nnstreamer_sink_example_play PUBLIC ${apppkgs_CFLAGS_OTHER})
IF (INSTALL_EXAMPLE_APP)
- INSTALL(TARGETS nnstreamer_sink_example nnstreamer_sink_example_play RUNTIME DESTINATION ${EXEC_PREFIX})
+ INSTALL(TARGETS nnstreamer_sink_example nnstreamer_sink_example_play RUNTIME DESTINATION ${EXAMPLE_EXEC_PREFIX})
ENDIF (INSTALL_EXAMPLE_APP)
OPTION(INSTALL_EXAMPLE_APP "Install example applications" ON)
+IF(INSTALL_EXAMPLE_APP)
+ IF(EXAMPLE_EXEC_PREFIX)
+ MESSAGE("Example application will be installed to ${EXAMPLE_EXEC_PREFIX}")
+ ELSE(EXAMPLE_EXEC_PREFIX)
+ SET(EXAMPLE_EXEC_PREFIX /usr/lib/nnstreamer/bin/)
+ ENDIF(EXAMPLE_EXEC_PREFIX)
+ENDIF(INSTALL_EXAMPLE_APP)
+
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "${PREFIX}/bin")
SET(INCLUDEDIR "${PREFIX}/include/nnstreamer")
pushd build
export GST_PLUGIN_PATH=$(pwd)
export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter
-%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF
+%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF -DINSTALL_EXAMPLE_APP=ON
make %{?_smp_mflags}
%if 0%{?unit_test}
./tests/unittest_common
%defattr(-,root,root,-)
%license LICENSE
%{_libdir}/*.so
+/usr/lib/nnstreamer/bin/*
%exclude %{_libdir}/libtensor_filter_tflitecore.so
%changelog
%files
%manifest nnstreamer.manifest
%defattr(-,root,root,-)
-%{_bindir}/*
+/usr/lib/nnstreamer/bin/*
%changelog
* Wed Jul 18 2018 MyungJoo Ham <myungjoo.ham@samsung.com>