- Licence text updated to only allow GPLv2
[qtrapids] / CMakeLists.txt
index adee58e..5ac910a 100644 (file)
@@ -2,6 +2,16 @@ project(qtrapids)
 cmake_minimum_required(VERSION 2.6)
 set(CMAKE_VERBOSE_MAKEFILE ON)
 
+# 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)
+
 add_definitions(-Wall -g)
 
 find_package(Qt4 REQUIRED)
@@ -9,4 +19,5 @@ find_package(Qt4 REQUIRED)
 add_subdirectory(./dbus)
 add_subdirectory(./src/client)
 add_subdirectory(./src/server)
+#add_subdirectory(./src/utest)