diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2010-12-08 14:32:45 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2010-12-11 12:18:50 +0200 |
commit | 15c9b1c9c9fefc9335161700f10101ad90e1497e (patch) | |
tree | 3b8b83f83a46029b5fa52b2864102f4d6eb55d91 | |
parent | 857f00d0e0c3403f7b9e43db376c2003d7c21e83 (diff) |
If QtGStreamer is a static lib, link compilation tests with GStreamer as well.
-rw-r--r-- | tests/compilation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/compilation/CompilationTests_CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/compilation/RunCompilationTests.cmake | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/compilation/CMakeLists.txt b/tests/compilation/CMakeLists.txt index 5fc1e0e..e015dd4 100644 --- a/tests/compilation/CMakeLists.txt +++ b/tests/compilation/CMakeLists.txt @@ -3,6 +3,7 @@ add_test(NAME compilation_tests -DQTGSTREAMER_LIBRARY=$<TARGET_FILE:${QTGSTREAMER_LIBRARY}> -DQTGSTREAMER_UI_LIBRARY=$<TARGET_FILE:${QTGSTREAMER_UI_LIBRARY}> -DQTGSTREAMER_INCLUDE_DIR=${QTGSTREAMER_INCLUDE_DIR} + -DQTGSTREAMER_STATIC=${QTGSTREAMER_STATIC} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DBINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/CompilationTests -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} diff --git a/tests/compilation/CompilationTests_CMakeLists.txt b/tests/compilation/CompilationTests_CMakeLists.txt index fe58e5f..3077e3d 100644 --- a/tests/compilation/CompilationTests_CMakeLists.txt +++ b/tests/compilation/CompilationTests_CMakeLists.txt @@ -11,6 +11,14 @@ 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() diff --git a/tests/compilation/RunCompilationTests.cmake b/tests/compilation/RunCompilationTests.cmake index 91a542b..6d3c489 100644 --- a/tests/compilation/RunCompilationTests.cmake +++ b/tests/compilation/RunCompilationTests.cmake @@ -16,6 +16,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -DQTGSTREAMER_UI_LIBRARY=${QTGSTREAMER_UI_LIBRARY} -DQTGSTREAMER_INCLUDE_DIR=${QTGSTREAMER_INCLUDE_DIR} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} + -DQTGSTREAMER_STATIC=${QTGSTREAMER_STATIC} WORKING_DIRECTORY ${BINARY_DIR} OUTPUT_QUIET RESULT_VARIABLE TESTS_RESULT |