+# Check if we are building under scratchbox and link with QtMaemo5 only in that case.
+# Thus, we maintain desktop build-ability also
+#set (SCRATCHBOX_UNAME $ENV{SBOX_UNAME_MACHINE})
+
+if (SCRATCHBOX_UNAME)
+ MESSAGE("Configuring for building under Scratchbox..")
+ SET(CMAKE_INSTALL_PREFIX /usr)
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif (SCRATCHBOX_UNAME)
+