Make smack a buildtime config option 74/3974/1
authorRusty Lynch <rusty.lynch@intel.com>
Wed, 12 Jun 2013 20:54:11 +0000 (13:54 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Wed, 12 Jun 2013 20:54:11 +0000 (13:54 -0700)
CMakeLists.txt
src/jobs/widget_install/task_smack.cpp

index b2262e4..423b6e4 100644 (file)
@@ -40,6 +40,7 @@ OPTION(MULTIPROCESS_SERVICE_SUPPORT "Process per service" OFF)
 OPTION(MULTIPROCESS_SERVICE_SUPPORT_INLINE "Process per service - inline mode support" OFF)
 OPTION(CSP_SUPPORT "Support for csp policy" ON)
 OPTION(ALLOW_NAVIGATION_SUPPORT "Support for allow-navigation" ON)
+OPTION(SMACK "Enable smack support" ON)
 
 ############################# compiler flags ##################################
 
@@ -88,7 +89,10 @@ ADD_DEFINITIONS("-Wextra")              # Generate even more extra warnings
 ADD_DEFINITIONS("-Wno-variadic-macros") # Inhibit variadic macros warnings (needed for ORM)
 ADD_DEFINITIONS("-Wno-deprecated")      # No warnings about deprecated features
 ADD_DEFINITIONS("-std=c++0x")           # accept C++11x standard
-ADD_DEFINITIONS("-DWRT_SMACK_ENABLED")  # enable smack
+
+IF(SMACK)
+    ADD_DEFINITIONS("-DWRT_SMACK_ENABLED")
+ENDIF(SMACK)
 
 ############################# Targets names ###################################
 
index 9769276..fb31538 100644 (file)
@@ -255,6 +255,7 @@ void TaskSmack::SetEndofInstallation()
 
 bool TaskSmack::setLabelForSharedDir(const char* pkgId)
 {
+#ifdef WRT_SMACK_LABEL
     /* shared directory */
     if (PC_OPERATION_SUCCESS != app_label_dir("*",
                 m_context.locations->getSharedRootDir().c_str())) {
@@ -320,6 +321,7 @@ bool TaskSmack::setLabelForSharedDir(const char* pkgId)
         return false;
     }
     freeList(pList);
+#endif
     return true;
 }
 } //namespace WidgetInstall