QGstClock test
[qtgstreamer:qtgstreamer.git] / CMakeLists.txt
1 project(QtGstreamer)
2 cmake_minimum_required(VERSION 2.6)
3 enable_testing()
4
5 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
6 set(BUILDING_QTGSTREAMER TRUE)
7 set(QTGSTREAMER_VERSION 0.1)
8 set(QTGSTREAMER_SOVERSION 0)
9
10 find_package(Qt4 COMPONENTS QtCore QtGui QtTest REQUIRED)
11 find_package(QtGstreamer REQUIRED)
12 find_package(Automoc4 REQUIRED)
13 find_package(GStreamer REQUIRED)
14 find_package(GStreamerPlugins)
15 find_package(GLIB2 REQUIRED)
16 find_package(GObject REQUIRED)
17 find_package(FLEX REQUIRED)
18 find_package(BISON REQUIRED)
19
20 if (${GSTREAMER_VERSION} VERSION_LESS "0.10.30")
21     message(FATAL_ERROR "QtGstreamer requires Gstreamer >= 0.10.30")
22 endif()
23
24 if (CMAKE_COMPILER_IS_GNUCXX)
25     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat-security -Wundef -Wpointer-arith -Wcast-align -fno-common")
26 endif ()
27
28 add_subdirectory(codegen)
29 add_subdirectory(src)
30 add_subdirectory(elements)
31 add_subdirectory(tests)
32 add_subdirectory(examples)
33
34 # Add uninstall target. Taken from the KDE4 scripts
35 configure_file("${CMAKE_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" @ONLY)
36 add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
37
38 # Add doc target
39 include(UseDoxygen)