diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-05-29 16:26:32 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2013-06-07 14:46:22 +0300 |
commit | aad220794775aa99459ae58d5497e1c8908394d2 (patch) | |
tree | 77e831434fef3c923e129edc030dc7c016f3a470 | |
parent | 042b189f6f01d89c88698c22e2b97dc27d626eb4 (diff) |
tests/compilation: Fix the compilation tests to work without FindQtGStreamer.cmake
-rw-r--r-- | tests/compilation/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/compilation/CompilationTests_CMakeLists.txt | 10 | ||||
-rw-r--r-- | tests/compilation/RunCompilationTests.cmake | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tests/compilation/CMakeLists.txt b/tests/compilation/CMakeLists.txt index 9fa7ce7..f621a09 100644 --- a/tests/compilation/CMakeLists.txt +++ b/tests/compilation/CMakeLists.txt @@ -1,9 +1,8 @@ add_test(NAME compilation_tests COMMAND ${CMAKE_COMMAND} + -DQT_VERSION=${QT_VERSION} -DQTGLIB_LIBRARY=$<TARGET_FILE:${QTGLIB_LIBRARY}> -DQTGSTREAMER_LIBRARY=$<TARGET_FILE:${QTGSTREAMER_LIBRARY}> - -DQTGSTREAMER_UI_LIBRARY=$<TARGET_FILE:${QTGSTREAMER_UI_LIBRARY}> - -DQTGSTREAMER_UTILS_LIBRARY=$<TARGET_FILE:${QTGSTREAMER_UTILS_LIBRARY}> -DQTGSTREAMER_INCLUDE_DIR=${QTGSTREAMER_INCLUDE_DIR} -DQTGSTREAMER_STATIC=${QTGSTREAMER_STATIC} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} diff --git a/tests/compilation/CompilationTests_CMakeLists.txt b/tests/compilation/CompilationTests_CMakeLists.txt index aa5b2bc..a256cd7 100644 --- a/tests/compilation/CompilationTests_CMakeLists.txt +++ b/tests/compilation/CompilationTests_CMakeLists.txt @@ -2,11 +2,15 @@ # 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) +cmake_minimum_required(VERSION 2.8.9) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +find_package(Boost 1.39 REQUIRED) +include(QtHelpers) +include(QtGStreamerConfigCommon) include(MacroCXXCompilationTest) -set(CMAKE_REQUIRED_LIBRARIES ${QTGSTREAMER_LIBRARIES}) +set(CMAKE_REQUIRED_LIBRARIES ${QTGSTREAMER_LIBRARY} ${QTGLIB_LIBRARY} ${QT_QTCORE_LIBRARY}) set(CMAKE_REQUIRED_INCLUDES ${QTGSTREAMER_INCLUDES}) set(CMAKE_REQUIRED_DEFINITIONS ${QTGSTREAMER_DEFINITIONS}) set(CMAKE_REQUIRED_FLAGS "${QTGSTREAMER_FLAGS}") diff --git a/tests/compilation/RunCompilationTests.cmake b/tests/compilation/RunCompilationTests.cmake index 904f9a2..6487bf2 100644 --- a/tests/compilation/RunCompilationTests.cmake +++ b/tests/compilation/RunCompilationTests.cmake @@ -12,6 +12,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/CompilationTests. # Run cmake to execute the tests execute_process(COMMAND ${CMAKE_COMMAND} + -DQT_VERSION=${QT_VERSION} -DQTGLIB_LIBRARY=${QTGLIB_LIBRARY} -DQTGSTREAMER_LIBRARY=${QTGSTREAMER_LIBRARY} -DQTGSTREAMER_UI_LIBRARY=${QTGSTREAMER_UI_LIBRARY} |