File: CompilationTests_CMakeLists.txt

package info (click to toggle)
qt-gstreamer 0.10.2-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,012 kB
  • ctags: 2,868
  • sloc: cpp: 17,352; yacc: 156; lex: 125; makefile: 23
file content (25 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This is a cmake project file that is used to run the compilation tests.
# We misuse cmake here by running tests with the try_compile command and basing
# the result of the whole test suite on the cmake exit status.

cmake_minimum_required(VERSION 2.8)
find_package(QtGStreamer REQUIRED)
include(MacroCXXCompilationTest)

set(CMAKE_REQUIRED_LIBRARIES ${QTGSTREAMER_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${QTGSTREAMER_INCLUDES})
set(CMAKE_REQUIRED_DEFINITIONS ${QTGSTREAMER_DEFINITIONS})
set(CMAKE_REQUIRED_FLAGS "${QTGSTREAMER_FLAGS}")

if (QTGSTREAMER_STATIC)
    find_package(GStreamer REQUIRED)
    find_package(GStreamerPluginsBase COMPONENTS interfaces REQUIRED)
    set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
                                 ${GSTREAMER_LIBRARY}
                                 ${GSTREAMER_INTERFACES_LIBRARY})
endif()

message("********* Begin running compilation tests *********")
include(CompilationTests.cmake)
evaluate_cxx_compilation_test_results()
message("********* Finished running compilation tests *********")