From a48129df54bd7fceab36829b099db2042a5f0964 Mon Sep 17 00:00:00 2001 From: Sangjung woo Date: Fri, 3 Aug 2018 15:11:17 +0900 Subject: [PATCH] [CMAKE] Cleanup the cmake files * Remove redundant minimum required version checker in CMakeLists * Move 'ADD_SUBDIRECTORY' statements as a single block to imporve readability Signed-off-by: Sangjung woo --- gst/tensor_converter/CMakeLists.txt | 2 -- gst/tensor_decoder/CMakeLists.txt | 2 -- gst/tensor_demux/CMakeLists.txt | 2 -- gst/tensor_filter/CMakeLists.txt | 2 -- gst/tensor_mux/CMakeLists.txt | 2 -- gst/tensor_saveload/CMakeLists.txt | 2 -- gst/tensor_sink/CMakeLists.txt | 2 -- gst/tensor_transform/CMakeLists.txt | 2 -- nnstreamer_example/CMakeLists.txt | 9 +++------ nnstreamer_example/custom_example_average/CMakeLists.txt | 2 -- nnstreamer_example/custom_example_passthrough/CMakeLists.txt | 2 -- nnstreamer_example/custom_example_scaler/CMakeLists.txt | 2 -- nnstreamer_example/example_cam/CMakeLists.txt | 2 -- nnstreamer_example/example_filter/CMakeLists.txt | 2 -- nnstreamer_example/example_sink/CMakeLists.txt | 2 -- tests/nnstreamer_tensors/tensors_test/CMakeLists.txt | 2 -- 16 files changed, 3 insertions(+), 36 deletions(-) diff --git a/gst/tensor_converter/CMakeLists.txt b/gst/tensor_converter/CMakeLists.txt index 6283fc5..d50bbc6 100644 --- a/gst/tensor_converter/CMakeLists.txt +++ b/gst/tensor_converter/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensor_converter SHARED tensor_converter.c) ADD_LIBRARY(tensor_converterStatic STATIC tensor_converter.c) diff --git a/gst/tensor_decoder/CMakeLists.txt b/gst/tensor_decoder/CMakeLists.txt index 12edeaf..d63b77d 100644 --- a/gst/tensor_decoder/CMakeLists.txt +++ b/gst/tensor_decoder/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensordec SHARED tensordec.c) ADD_LIBRARY(tensordecStatic STATIC tensordec.c) diff --git a/gst/tensor_demux/CMakeLists.txt b/gst/tensor_demux/CMakeLists.txt index b51165f..9065675 100644 --- a/gst/tensor_demux/CMakeLists.txt +++ b/gst/tensor_demux/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensordemux SHARED gsttensordemux.c ) ADD_LIBRARY(tensordemuxStatic STATIC gsttensordemux.c) diff --git a/gst/tensor_filter/CMakeLists.txt b/gst/tensor_filter/CMakeLists.txt index 5ca3181..a35fcb0 100644 --- a/gst/tensor_filter/CMakeLists.txt +++ b/gst/tensor_filter/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - # check whether TENSORFLOW_LITE is available. # DISABLE_TENSORFLOW_LITE is defined at /debian/rules according to the build environment IF(DISABLE_TENSORFLOW_LITE) # NOT AVAILABE diff --git a/gst/tensor_mux/CMakeLists.txt b/gst/tensor_mux/CMakeLists.txt index 0219b55..4e6beb3 100644 --- a/gst/tensor_mux/CMakeLists.txt +++ b/gst/tensor_mux/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensormux SHARED gsttensormux.c ) ADD_LIBRARY(tensormuxStatic STATIC gsttensormux.c) diff --git a/gst/tensor_saveload/CMakeLists.txt b/gst/tensor_saveload/CMakeLists.txt index 28cab1b..bb4dc24 100644 --- a/gst/tensor_saveload/CMakeLists.txt +++ b/gst/tensor_saveload/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensor_load SHARED tensor_load.c) ADD_LIBRARY(tensor_loadStatic STATIC tensor_load.c) diff --git a/gst/tensor_sink/CMakeLists.txt b/gst/tensor_sink/CMakeLists.txt index 58c3126..53fad90 100644 --- a/gst/tensor_sink/CMakeLists.txt +++ b/gst/tensor_sink/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensor_sink SHARED tensor_sink.c) ADD_LIBRARY(tensor_sinkStatic STATIC tensor_sink.c) diff --git a/gst/tensor_transform/CMakeLists.txt b/gst/tensor_transform/CMakeLists.txt index a83f302..3a71319 100644 --- a/gst/tensor_transform/CMakeLists.txt +++ b/gst/tensor_transform/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(tensor_transform SHARED tensor_transform.c) ADD_LIBRARY(tensor_transformStatic STATIC tensor_transform.c) diff --git a/nnstreamer_example/CMakeLists.txt b/nnstreamer_example/CMakeLists.txt index 415ef44..241e8f7 100644 --- a/nnstreamer_example/CMakeLists.txt +++ b/nnstreamer_example/CMakeLists.txt @@ -1,9 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -ADD_SUBDIRECTORY(custom_example_passthrough) -ADD_SUBDIRECTORY(custom_example_scaler) -ADD_SUBDIRECTORY(custom_example_average) - # Example App build requires a few additional attention if tizen_app_build_example is not used. SET(PKGAPP_MODULES @@ -15,6 +9,9 @@ SET(PKGAPP_MODULES ) pkg_check_modules(apppkgs REQUIRED ${PKGAPP_MODULES}) +ADD_SUBDIRECTORY(custom_example_passthrough) +ADD_SUBDIRECTORY(custom_example_scaler) +ADD_SUBDIRECTORY(custom_example_average) ADD_SUBDIRECTORY(example_cam) ADD_SUBDIRECTORY(example_sink) ADD_SUBDIRECTORY(example_filter) diff --git a/nnstreamer_example/custom_example_average/CMakeLists.txt b/nnstreamer_example/custom_example_average/CMakeLists.txt index 2761894..ec55a29 100644 --- a/nnstreamer_example/custom_example_average/CMakeLists.txt +++ b/nnstreamer_example/custom_example_average/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(nnstreamer_customfilter_average SHARED nnstreamer_customfilter_example_average.c) TARGET_LINK_LIBRARIES(nnstreamer_customfilter_average ${pkgs_LIBRARIES}) diff --git a/nnstreamer_example/custom_example_passthrough/CMakeLists.txt b/nnstreamer_example/custom_example_passthrough/CMakeLists.txt index 4467547..279cf6f 100644 --- a/nnstreamer_example/custom_example_passthrough/CMakeLists.txt +++ b/nnstreamer_example/custom_example_passthrough/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.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) diff --git a/nnstreamer_example/custom_example_scaler/CMakeLists.txt b/nnstreamer_example/custom_example_scaler/CMakeLists.txt index 1195a45..1361b8f 100644 --- a/nnstreamer_example/custom_example_scaler/CMakeLists.txt +++ b/nnstreamer_example/custom_example_scaler/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(nnstreamer_customfilter_scaler SHARED nnstreamer_customfilter_example_scaler.c) TARGET_LINK_LIBRARIES(nnstreamer_customfilter_scaler ${pkgs_LIBRARIES}) diff --git a/nnstreamer_example/example_cam/CMakeLists.txt b/nnstreamer_example/example_cam/CMakeLists.txt index 9516f32..72eb85c 100644 --- a/nnstreamer_example/example_cam/CMakeLists.txt +++ b/nnstreamer_example/example_cam/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - # example app for webcam ADD_EXECUTABLE(nnstreamer_example_cam nnstreamer_example_cam.c) diff --git a/nnstreamer_example/example_filter/CMakeLists.txt b/nnstreamer_example/example_filter/CMakeLists.txt index 25e00ae..b7da6da 100644 --- a/nnstreamer_example/example_filter/CMakeLists.txt +++ b/nnstreamer_example/example_filter/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - # demo app ADD_EXECUTABLE(nnstreamer_example_filter nnstreamer_example_filter.c) diff --git a/nnstreamer_example/example_sink/CMakeLists.txt b/nnstreamer_example/example_sink/CMakeLists.txt index 089f52f..01b2b0a 100644 --- a/nnstreamer_example/example_sink/CMakeLists.txt +++ b/nnstreamer_example/example_sink/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - # example 1 ADD_EXECUTABLE(nnstreamer_sink_example nnstreamer_sink_example.c) diff --git a/tests/nnstreamer_tensors/tensors_test/CMakeLists.txt b/tests/nnstreamer_tensors/tensors_test/CMakeLists.txt index 7f0e942..1e14df0 100644 --- a/tests/nnstreamer_tensors/tensors_test/CMakeLists.txt +++ b/tests/nnstreamer_tensors/tensors_test/CMakeLists.txt @@ -1,5 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - ADD_LIBRARY(testtensors SHARED gsttesttensors.c ) ADD_LIBRARY(testtensorsStatic STATIC gsttesttensors.c) -- 2.7.4