define DBUS_BUILD_TESTS only if the option is enabled (cherry picked from commit...
authorFrank Osterfeld <frank@kdab.net>
Wed, 29 Apr 2009 11:22:44 +0000 (13:22 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 30 Nov 2009 10:39:24 +0000 (11:39 +0100)
cmake/CMakeLists.txt

index 7a08a51..cff6f65 100644 (file)
@@ -233,7 +233,10 @@ set (DBUS_DAEMONDIR ${EXPANDED_BINDIR})
 
 #AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
 OPTION(DBUS_BUILD_TESTS "enable unit test code" ON)
-add_definitions(-DDBUS_BUILD_TESTS)
+if(DBUS_BUILD_TESTS)
+    add_definitions(-DDBUS_BUILD_TESTS)
+endif(DBUS_BUILD_TESTS)
 
 # win32 dbus service support - this support is not complete
 OPTION(DBUS_SERVICE "enable dbus service installer" OFF)