CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(target "ctx-place")
+# Build flag for the place auto detection engine.
+# Set this to "yes" to enable the engine.
+SET(enable_recog_engine "no")
+
# Common Profile
FILE(GLOB srcs *.cpp)
# Mobile Profile
IF("${PROFILE}" STREQUAL "mobile")
FILE(GLOB_RECURSE srcs ${srcs} geofence/*.cpp)
- FILE(GLOB_RECURSE srcs ${srcs} recognition/*.cpp)
- SET(deps "${deps} capi-location-manager")
SET(deps "${deps} capi-geofence-manager")
- SET(deps "${deps} capi-network-wifi")
+ IF("${enable_recog_engine}" STREQUAL "yes")
+ FILE(GLOB_RECURSE srcs ${srcs} recognition/*.cpp)
+ SET(deps "${deps} capi-location-manager")
+ SET(deps "${deps} capi-network-wifi")
+ ENDIF("${enable_recog_engine}" STREQUAL "yes")
ENDIF("${PROFILE}" STREQUAL "mobile")
MESSAGE("Place Provider Sources: ${srcs}")
SET_TARGET_PROPERTIES(${target} PROPERTIES SOVERSION ${MAJORVER})
SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER})
+IF(NOT "${enable_recog_engine}" STREQUAL "yes")
+ SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "_DISABLE_RECOG_ENGINE_")
+ENDIF(NOT "${enable_recog_engine}" STREQUAL "yes")
+
# Install
INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries)
#ifdef _MOBILE_
#include "geofence/place_geofence.h"
+#ifndef _DISABLE_RECOG_ENGINE_
#include "recognition/place_recognition.h"
-#endif
+#endif /* _DISABLE_RECOG_ENGINE_ */
+#endif /* _MOBILE_ */
template<typename provider>
void register_provider(const char *subject, const char *privilege)
register_provider<place_geofence_provider>(PLACE_SUBJ_GEOFENCE, PLACE_PRIV_GEOFENCE);
place_geofence_provider::submit_trigger_item();
+#ifndef _DISABLE_RECOG_ENGINE_
place_recognition_provider::create(NULL);
register_provider<place_recognition_provider>(PLACE_SUBJ_RECOGNITION, PLACE_PRIV_RECOGNITION);
-#endif
+#endif /* _DISABLE_RECOG_ENGINE_ */
+
+#endif /* _MOBILE_ */
return true;
}
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(target "ctx-statistics")
+# Build flag for the prediction engine.
+# Set this to "yes" to enable the engine.
+SET(enable_prediction_engine "no")
+
# Common Options
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/shared
FILE(GLOB srcs ./*.cpp)
FILE(GLOB srcs ${srcs} shared/*.cpp)
FILE(GLOB srcs ${srcs} app/*.cpp)
-FILE(GLOB srcs ${srcs} prediction/*.cpp)
+IF("${enable_prediction_engine}" STREQUAL "yes")
+ FILE(GLOB srcs ${srcs} prediction/*.cpp)
+ENDIF("${enable_prediction_engine}" STREQUAL "yes")
SET(deps "capi-system-runtime-info pkgmgr pkgmgr-info capi-appfw-package-manager")
SET(deps "${deps} capi-appfw-application capi-appfw-app-manager")
SET_TARGET_PROPERTIES(${target} PROPERTIES SOVERSION ${MAJORVER})
SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER})
+IF(NOT "${enable_prediction_engine}" STREQUAL "yes")
+ SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "_DISABLE_PREDICTION_ENGINE_")
+ENDIF(NOT "${enable_prediction_engine}" STREQUAL "yes")
+
# Install
INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries)
#include "app/app_stats_provider.h"
+#ifndef _DISABLE_PREDICTION_ENGINE_
+// include prediction engine header files here
+#endif
+
#ifdef _MOBILE_
#include "media/media_stats_provider.h"
#include "social/social_stats_provider.h"
register_provider<app_statistics_provider>(APP_SUBJ_FREQUENCY, APP_HISTORY_PRIV);
app_statistics_provider::submit_trigger_item();
+#ifndef _DISABLE_PREDICTION_ENGINE_
+// initialize the prediction engine here
+#endif
+
#ifdef _MOBILE_
media_statistics_provider::create(NULL);
register_provider<media_statistics_provider>(MEDIA_SUBJ_PEAK_TIME_FOR_MUSIC, MEDIA_HISTORY_PRIV);