-SET(SRCS_common src/appcore.c src/appcore-i18n.c src/appcore-measure.c
-# src/appcore-noti.c src/appcore-pmcontrol.c
- src/appcore-rotation.c
-# src/appcore-util.c
- src/appcore-X.c)
+SET(SRCS_common src/appcore.c src/appcore-i18n.c src/appcore-measure.c src/appcore-rotation.c)
+
+IF(_WITH_WAYLAND)
+ ADD_DEFINITIONS("-DWAYLAND")
+ENDIF(_WITH_WAYLAND)
+
+IF(_WITH_X11)
+ ADD_DEFINITIONS("-DX11")
+ SET(SRCS_common ${SRCS_common} src/appcore-X.c)
+ENDIF(_WITH_X11)
+
+IF(_APPFW_FEATURE_BACKGROUND_MANAGEMENT)
+ ADD_DEFINITIONS("-D_APPFW_FEATURE_BACKGROUND_MANAGEMENT")
+ENDIF(_APPFW_FEATURE_BACKGROUND_MANAGEMENT)
+