[Build] default option for extern libs accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061407 accepted/tizen/7.0/unified/hotfix/20221116.111159 accepted/tizen/unified/20221001.053448 tizen_7.0_m2_release
authorJaeyun <jy1210.jung@samsung.com>
Tue, 27 Sep 2022 09:21:15 +0000 (18:21 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Fri, 30 Sep 2022 02:52:25 +0000 (11:52 +0900)
Set default option off for external libraries (AITT and Paho-MQTT).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
CMakeLists.txt
debian/rules
packaging/nnstreamer-edge.spec

index 5a0527c1df6e7ef8d8ca8b63ee30b60d06388b5c..4862b06cd17869fb42ffc94ef8b3f44c1b0e80c0 100644 (file)
@@ -7,8 +7,8 @@ OPTION(ENABLE_TEST      "Enable Test case" OFF)
 OPTION(ENABLE_DEBUG     "Enable Debug" OFF)
 
 # Default features. You may change the features according to your needs.
-OPTION(MQTT_SUPPORT     "Enable MQTT" ON)
-OPTION(AITT_SUPPORT     "Enable AITT" ON)
+OPTION(MQTT_SUPPORT     "Enable MQTT" OFF)
+OPTION(AITT_SUPPORT     "Enable AITT" OFF)
 
 IF (NOT DEFINED VERSION)
     SET(VERSION    0.1.0)
@@ -50,7 +50,7 @@ IF(MQTT_SUPPORT)
         FIND_LIBRARY(PAHO_MQTT_LIB NAMES paho-mqtt3a paho-mqtt3c paho-mqtt3as paho-mqtt3cs)
 
         IF(NOT PAHO_MQTT_LIB)
-            MESSAGE(FATAL_ERROR "Cannot find Paho MQTT library." )
+            MESSAGE(FATAL_ERROR "Cannot find Paho MQTT library.")
         ELSE()
             MESSAGE("Found Paho MQTT library.")
         ENDIF()
@@ -63,8 +63,7 @@ ENDIF()
 IF(AITT_SUPPORT)
     FIND_LIBRARY(AITT_LIB NAMES aitt)
     IF(NOT AITT_LIB)
-        MESSAGE("Cannot find AITT library.")
-        SET(AITT_SUPPORT OFF)
+        MESSAGE(FATAL_ERROR "Cannot find AITT library.")
     ELSE()
         MESSAGE("Found AITT library.")
         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_AITT=1")
index 89f0bd1fc25203389c7e4ec0334a622fa68e4599..316a2850fcf6ad31281b23935cad7a2046357cba 100755 (executable)
@@ -23,4 +23,4 @@ EDGE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH)
        dh $@ --buildsystem=cmake --builddirectory=build --parallel
 
 override_dh_auto_configure:
-       dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=$(EDGE_INSTALL_LIBDIR)
+       dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=$(EDGE_INSTALL_LIBDIR) -DMQTT_SUPPORT=ON
index 4f224910f153095dfa430dd9c7bb25b4b815f284..2dcbf3eb2353175397fa151727e635f69888b136 100644 (file)
@@ -80,6 +80,18 @@ HTML pages of lcov results of nnstreamer-edge generated during rpm build
 %define enable_unittest -DENABLE_TEST=OFF
 %endif
 
+%if 0%{?mqtt_support}
+%define enable_mqtt -DMQTT_SUPPORT=ON
+%else
+%define enable_mqtt -DMQTT_SUPPORT=OFF
+%endif
+
+%if 0%{?aitt_support}
+%define enable_aitt -DAITT_SUPPORT=ON
+%else
+%define enable_aitt -DAITT_SUPPORT=OFF
+%endif
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -105,7 +117,8 @@ mkdir -p build
 pushd build
 %cmake .. \
     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-    -DVERSION=%{version} %{enable_unittest}
+    -DVERSION=%{version} \
+    %{enable_unittest} %{enable_mqtt} %{enable_aitt}
 
 make %{?jobs:-j%jobs}
 popd