summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDario Freddi <dario.freddi@collabora.co.uk>2010-09-16 02:47:56 +0200
committerDario Freddi <dario.freddi@collabora.co.uk>2010-09-20 17:03:54 +0200
commit5e5043a93aba9c5551475cb938453b476345ccdc (patch)
tree2d080d1c971e62ba695bf9288c7f0a66acb14979 /CMakeLists.txt
parentff262e8bcbfbc7f8237841d4015108ad0c549141 (diff)
cmake: Refactor and fix some macros to make them more cmake-ish, add tpqt4_ prefix to EVERY macro, and document decently
all the macros and the hot paths of the buildsystem
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4ac9f8c..16aeaef9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,6 +89,7 @@ macro_log_feature(QT4_GLIB_SUPPORT "Qt4 Glib Support"
"http://qt.nokia.com/" FALSE ""
"Needed, together with Telepathy-Glib, to build some additional test cases")
+# Check for operator== in QDBusVariant
SET(CMAKE_REQUIRED_LIBRARIES ${QT_QTDBUS_LIBRARY})
CHECK_CXX_SOURCE_COMPILES("
#include <QtDBus>
@@ -148,11 +149,15 @@ macro_log_feature(TELEPATHYFARSIGHT_FOUND "Telepathy-Farsight"
"A Framework for dealing with audio/video conferencing protocols"
"http://farsight.freedesktop.org/wiki/" FALSE "0.0.4"
"Needed, together with GStreamer, to build telepathy-qt4-farsight and some additional examples")
+
+# Find GStreamer
find_package(GStreamer)
macro_log_feature(GSTREAMER_FOUND "GStreamer"
"An open source multimedia framework"
"Needed, together with Tp-Farsight, to build telepathy-qt4-farsight and some additional examples"
"http://www.gstreamer.net/" FALSE)
+
+# Build TelepathyQt4-Farsight only if GStreamer, TelepathyFarsight and all of their dependencies were found
if (TELEPATHYFARSIGHT_FOUND AND GSTREAMER_FOUND AND GLIB2_FOUND AND GOBJECT_FOUND AND DBUS_FOUND AND LIBXML2_FOUND)
set (FARSIGHT_COMPONENTS_FOUND 1)
else (TELEPATHYFARSIGHT_FOUND AND GSTREAMER_FOUND AND GLIB2_FOUND AND GOBJECT_FOUND AND DBUS_FOUND AND LIBXML2_FOUND)
@@ -169,19 +174,22 @@ macro_log_feature(TELEPATHYGLIB_FOUND "Telepathy-glib"
find_program(GLIB_GENMARSHAL glib-genmarshal)
-# process results...
+# Enable glib-based tests only if Qt4 has GLib support and Telepathy-glib was found
if(QT4_GLIB_SUPPORT AND TELEPATHYGLIB_FOUND AND GLIB2_FOUND AND DBUS_FOUND)
set(ENABLE_TP_GLIB_TESTS 1)
else(QT4_GLIB_SUPPORT AND TELEPATHYGLIB_FOUND AND GLIB2_FOUND AND DBUS_FOUND)
set(ENABLE_TP_GLIB_TESTS 0)
endif(QT4_GLIB_SUPPORT AND TELEPATHYGLIB_FOUND AND GLIB2_FOUND AND DBUS_FOUND)
+# Add the source subdirectories
add_subdirectory(TelepathyQt4)
add_subdirectory(examples)
add_subdirectory(tests)
+# Generate config.h
configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h)
+# Create the uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@@ -190,6 +198,8 @@ configure_file(
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+# Display the feature log
macro_display_feature_log()
+# Always keep it last: CPack definitions file
include(TelepathyDist)