summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-05-23 13:49:17 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-05-23 13:49:17 +0300
commit7dbcdbffcd521a181e3a761cca627af95948f881 (patch)
treee42f017f59afa9a4a9ec82e10bbbd4d91d9709cc
parentdf9972ab5863daa5b8862c4f88b2fe7bc9215048 (diff)
cmake: Drop completely the optional automoc dependency
Since we require cmake 2.8.9 now, there is no point.
-rw-r--r--CMakeLists.txt34
-rw-r--r--README3
-rw-r--r--elements/gstqtvideosink/CMakeLists.txt4
-rw-r--r--examples/player/CMakeLists.txt13
-rw-r--r--examples/qmlplayer/CMakeLists.txt12
-rw-r--r--examples/recorder/CMakeLists.txt13
-rw-r--r--examples/voip/CMakeLists.txt13
-rw-r--r--src/QGlib/CMakeLists.txt2
-rw-r--r--src/QGst/CMakeLists.txt6
-rw-r--r--src/qml/CMakeLists.txt2
-rw-r--r--tests/auto/CMakeLists.txt2
-rw-r--r--tests/manual/CMakeLists.txt8
12 files changed, 28 insertions, 84 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93cc560..2b70cec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8.9)
enable_testing()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(CMAKE_AUTOMOC ON)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
set(QTGSTREAMER_VERSION 0.10.2.1)
@@ -39,23 +40,6 @@ macro_log_feature(Boost_FOUND "Boost" "Required for building QtGLib" "http://www
set(BUILDING_QTGSTREAMER TRUE)
find_package(QtGStreamer REQUIRED)
-if (${CMAKE_VERSION} VERSION_LESS "2.8.6")
- find_package(Automoc4)
- macro_log_feature(Automoc4_FOUND "Automoc 4" "Required for the build system to generate moc files properly"
- "https://projects.kde.org/projects/kdesupport/automoc" TRUE "0.9.88")
-else()
- set(Automoc4_FOUND TRUE)
- set(CMAKE_AUTOMOC TRUE)
-
- macro(automoc4_add_executable)
- add_executable(${ARGV})
- endmacro()
-
- macro(automoc4_add_library)
- add_library(${ARGV})
- endmacro()
-endif()
-
find_package(GStreamer 0.10.33 COMPONENTS base)
macro_log_feature(GSTREAMER_FOUND "GStreamer" "Required to build QtGStreamer"
"http://gstreamer.freedesktop.org/" TRUE "0.10.33")
@@ -132,17 +116,15 @@ if (QTGSTREAMER_CODEGEN AND FLEX_FOUND AND BISON_FOUND)
add_subdirectory(codegen)
endif()
-if (Automoc4_FOUND) # avoid errors about missing automoc4_add_* macros
- add_subdirectory(src)
- add_subdirectory(elements)
+add_subdirectory(src)
+add_subdirectory(elements)
- if (QTGSTREAMER_TESTS)
- add_subdirectory(tests)
- endif()
+if (QTGSTREAMER_TESTS)
+ add_subdirectory(tests)
+endif()
- if (QTGSTREAMER_EXAMPLES)
- add_subdirectory(examples)
- endif()
+if (QTGSTREAMER_EXAMPLES)
+ add_subdirectory(examples)
endif()
# Add uninstall target. Taken from the KDE4 scripts
diff --git a/README b/README
index 75957cf..fafc4d6 100644
--- a/README
+++ b/README
@@ -34,9 +34,6 @@ QtGStreamer requires the following software to be installed in order to build:
and including gstreamer-plugins-base (0.10.33 or later)
* Qt 4.7 or later <http://qt.nokia.com/>
* Boost 1.39 or later <http://www.boost.org/>
- * Automoc (only with cmake < 2.8.6) <https://projects.kde.org/projects/kdesupport/automoc/>
- - NOTE: Automoc is not needed with cmake >= 2.8.6
- as it has been integrated into cmake itself
* Flex (only if QTGSTREAMER_CODEGEN=ON, see below) <http://flex.sourceforge.net/>
* Bison (only if QTGSTREAMER_CODEGEN=ON, see below) <http://www.gnu.org/software/bison/>
diff --git a/elements/gstqtvideosink/CMakeLists.txt b/elements/gstqtvideosink/CMakeLists.txt
index 1ca800f..c490e1b 100644
--- a/elements/gstqtvideosink/CMakeLists.txt
+++ b/elements/gstqtvideosink/CMakeLists.txt
@@ -42,7 +42,7 @@ else()
add_definitions(-DGST_QT_VIDEO_SINK_NO_OPENGL)
endif()
-automoc4_add_library(gstqtvideosink MODULE ${GstQtVideoSink_SRCS} ${GstQtVideoSink_GL_SRCS})
+add_library(gstqtvideosink MODULE ${GstQtVideoSink_SRCS} ${GstQtVideoSink_GL_SRCS})
target_link_libraries(gstqtvideosink
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
@@ -57,7 +57,7 @@ install(TARGETS gstqtvideosink DESTINATION ${PLUGINS_INSTALL_DIR})
if (QTGSTREAMER_TESTS)
- automoc4_add_executable(qtvideosink_autotest
+ add_executable(qtvideosink_autotest
autotest.cpp
utils.cpp
bufferformat.cpp
diff --git a/examples/player/CMakeLists.txt b/examples/player/CMakeLists.txt
index 3deccd2..b89363d 100644
--- a/examples/player/CMakeLists.txt
+++ b/examples/player/CMakeLists.txt
@@ -2,16 +2,7 @@ project(qtgst-example-player)
if (NOT BUILDING_QTGSTREAMER)
find_package(QtGStreamer REQUIRED)
-
- if (${CMAKE_VERSION} VERSION_LESS "2.8.6")
- find_package(Automoc4 REQUIRED)
- else()
- set(CMAKE_AUTOMOC TRUE)
-
- macro(automoc4_add_executable)
- add_executable(${ARGV})
- endmacro()
- endif()
+ set(CMAKE_AUTOMOC ON)
endif()
include_directories(${QTGSTREAMER_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
@@ -20,5 +11,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
set(player_SOURCES main.cpp player.cpp mediaapp.cpp)
-automoc4_add_executable(player ${player_SOURCES})
+add_executable(player ${player_SOURCES})
target_link_libraries(player ${QTGSTREAMER_UI_LIBRARIES})
diff --git a/examples/qmlplayer/CMakeLists.txt b/examples/qmlplayer/CMakeLists.txt
index 7632145..1c7f17a 100644
--- a/examples/qmlplayer/CMakeLists.txt
+++ b/examples/qmlplayer/CMakeLists.txt
@@ -9,15 +9,7 @@ if (NOT BUILDING_QTGSTREAMER)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules)
find_package(OpenGLES2)
- if (${CMAKE_VERSION} VERSION_LESS "2.8.6")
- find_package(Automoc4 REQUIRED)
- else()
- set(CMAKE_AUTOMOC TRUE)
-
- macro(automoc4_add_executable)
- add_executable(${ARGV})
- endmacro()
- endif()
+ set(CMAKE_AUTOMOC ON)
else()
# allow the example to run from the build tree without installing QtGStreamer
add_definitions(
@@ -44,7 +36,7 @@ endif()
set(qmlplayer_SOURCES main.cpp player.cpp)
qt4_add_resources(qmlplayer_rcc_SOURCES qmlplayer.qrc)
-automoc4_add_executable(qmlplayer
+add_executable(qmlplayer
${qmlplayer_SOURCES}
${qmlplayer_rcc_SOURCES}
)
diff --git a/examples/recorder/CMakeLists.txt b/examples/recorder/CMakeLists.txt
index 96937b9..26d482f 100644
--- a/examples/recorder/CMakeLists.txt
+++ b/examples/recorder/CMakeLists.txt
@@ -2,16 +2,7 @@ project(qtgst-example-recorder)
if (NOT BUILDING_QTGSTREAMER)
find_package(QtGStreamer REQUIRED)
-
- if (${CMAKE_VERSION} VERSION_LESS "2.8.6")
- find_package(Automoc4 REQUIRED)
- else()
- set(CMAKE_AUTOMOC TRUE)
-
- macro(automoc4_add_executable)
- add_executable(${ARGV})
- endmacro()
- endif()
+ set(CMAKE_AUTOMOC ON)
endif()
include_directories(${QTGSTREAMER_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
@@ -19,5 +10,5 @@ add_definitions(${QTGSTREAMER_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
qt4_wrap_ui(recorder_UI_SRCS recorder.ui)
-automoc4_add_executable(recorder main.cpp ${recorder_UI_SRCS})
+add_executable(recorder main.cpp ${recorder_UI_SRCS})
target_link_libraries(recorder ${QTGSTREAMER_LIBRARIES} ${QT_QTGUI_LIBRARY})
diff --git a/examples/voip/CMakeLists.txt b/examples/voip/CMakeLists.txt
index 48705a3..4d31591 100644
--- a/examples/voip/CMakeLists.txt
+++ b/examples/voip/CMakeLists.txt
@@ -2,16 +2,7 @@ project(qtgst-example-voip)
if (NOT BUILDING_QTGSTREAMER)
find_package(QtGStreamer REQUIRED)
-
- if (${CMAKE_VERSION} VERSION_LESS "2.8.6")
- find_package(Automoc4 REQUIRED)
- else()
- set(CMAKE_AUTOMOC TRUE)
-
- macro(automoc4_add_executable)
- add_executable(${ARGV})
- endmacro()
- endif()
+ set(CMAKE_AUTOMOC ON)
endif()
include_directories(${QTGSTREAMER_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
@@ -19,5 +10,5 @@ add_definitions(${QTGSTREAMER_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
qt4_wrap_ui(voip_UI_SRCS voip.ui)
-automoc4_add_executable(voip main.cpp ${voip_UI_SRCS})
+add_executable(voip main.cpp ${voip_UI_SRCS})
target_link_libraries(voip ${QTGSTREAMER_UI_LIBRARIES})
diff --git a/src/QGlib/CMakeLists.txt b/src/QGlib/CMakeLists.txt
index ac3129c..915bbbd 100644
--- a/src/QGlib/CMakeLists.txt
+++ b/src/QGlib/CMakeLists.txt
@@ -45,7 +45,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${GOBJECT_INCLUDE_DIR} ${GLIB2_I
run_codegen("QGlib" "${QtGLib_CODEGEN_INCLUDES}" "${QtGLib_CODEGEN_HEADERS}")
# Build and link QtGLib
-automoc4_add_library(QtGLib ${SHARED_OR_STATIC} ${QtGLib_SRCS})
+add_library(QtGLib ${SHARED_OR_STATIC} ${QtGLib_SRCS})
set_target_properties(QtGLib PROPERTIES OUTPUT_NAME QtGLib-${QTGLIB_API_VERSION}
SOVERSION ${QTGLIB_SOVERSION}
VERSION ${QTGSTREAMER_VERSION})
diff --git a/src/QGst/CMakeLists.txt b/src/QGst/CMakeLists.txt
index 602ec6f..df1f6d4 100644
--- a/src/QGst/CMakeLists.txt
+++ b/src/QGst/CMakeLists.txt
@@ -144,7 +144,7 @@ endif()
run_codegen("QGst" "${QtGStreamer_CODEGEN_INCLUDES}" "${QtGStreamer_CODEGEN_HEADERS}")
# Build and link QtGStreamer
-automoc4_add_library(QtGStreamer ${SHARED_OR_STATIC} ${QtGStreamer_SRCS})
+add_library(QtGStreamer ${SHARED_OR_STATIC} ${QtGStreamer_SRCS})
set_target_properties(QtGStreamer PROPERTIES OUTPUT_NAME QtGStreamer-${QTGSTREAMER_API_VERSION}
SOVERSION ${QTGSTREAMER_SOVERSION}
VERSION ${QTGSTREAMER_VERSION})
@@ -154,7 +154,7 @@ target_link_libraries(QtGStreamer ${QTGLIB_LIBRARY} ${GOBJECT_LIBRARIES}
target_link_libraries(QtGStreamer LINK_INTERFACE_LIBRARIES ${QTGLIB_LIBRARY})
# Build and link QtGStreamerUi
-automoc4_add_library(QtGStreamerUi ${SHARED_OR_STATIC} ${QtGStreamerUi_SRCS})
+add_library(QtGStreamerUi ${SHARED_OR_STATIC} ${QtGStreamerUi_SRCS})
set_target_properties(QtGStreamerUi PROPERTIES OUTPUT_NAME QtGStreamerUi-${QTGSTREAMER_API_VERSION}
SOVERSION ${QTGSTREAMER_UI_SOVERSION}
VERSION ${QTGSTREAMER_VERSION})
@@ -162,7 +162,7 @@ target_link_libraries(QtGStreamerUi ${QT_QTGUI_LIBRARY} ${QTGSTREAMER_LIBRARY} $
target_link_libraries(QtGStreamerUi LINK_INTERFACE_LIBRARIES ${QT_QTGUI_LIBRARY} ${QTGSTREAMER_LIBRARY})
# Build and link QtGStreamerUtils
-automoc4_add_library(QtGStreamerUtils ${SHARED_OR_STATIC} ${QtGStreamerUtils_SRCS})
+add_library(QtGStreamerUtils ${SHARED_OR_STATIC} ${QtGStreamerUtils_SRCS})
set_target_properties(QtGStreamerUtils PROPERTIES OUTPUT_NAME QtGStreamerUtils-${QTGSTREAMER_API_VERSION}
SOVERSION ${QTGSTREAMER_UTILS_SOVERSION}
VERSION ${QTGSTREAMER_VERSION})
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt
index be5ab55..d885f0b 100644
--- a/src/qml/CMakeLists.txt
+++ b/src/qml/CMakeLists.txt
@@ -4,7 +4,7 @@ set(QtGStreamerQML_SRCS
)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-automoc4_add_library(QtGStreamerQML MODULE ${QtGStreamerQML_SRCS})
+add_library(QtGStreamerQML MODULE ${QtGStreamerQML_SRCS})
target_link_libraries(QtGStreamerQML
${QTGSTREAMER_UI_LIBRARIES}
${QT_QTDECLARATIVE_LIBRARY}
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 3212d64..147cd4a 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -5,7 +5,7 @@ add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
macro(qgst_test target)
- automoc4_add_executable(${target} "${target}.cpp")
+ add_executable(${target} "${target}.cpp")
target_link_libraries(${target} ${QT_QTTEST_LIBRARY} ${GSTREAMER_LIBRARY}
${GOBJECT_LIBRARIES} ${QTGSTREAMER_LIBRARIES})
add_test(NAME ${target} COMMAND ${target})
diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt
index 5d4ac2b..a51ef3e 100644
--- a/tests/manual/CMakeLists.txt
+++ b/tests/manual/CMakeLists.txt
@@ -3,18 +3,18 @@ add_definitions(${QTGSTREAMER_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
qt4_wrap_ui(QWIDGETVIDEOSINKTEST_UI qwidgetvideosinktest.ui)
-automoc4_add_executable(qwidgetvideosinktest qwidgetvideosinktest.cpp ${QWIDGETVIDEOSINKTEST_UI})
+add_executable(qwidgetvideosinktest qwidgetvideosinktest.cpp ${QWIDGETVIDEOSINKTEST_UI})
target_link_libraries(qwidgetvideosinktest ${QT_QTGUI_LIBRARIES} ${QTGSTREAMER_LIBRARIES})
qt4_wrap_ui(VIDEOWIDGETTEST_UI videowidgettest.ui)
-automoc4_add_executable(videowidgettest videowidgettest.cpp ${VIDEOWIDGETTEST_UI})
+add_executable(videowidgettest videowidgettest.cpp ${VIDEOWIDGETTEST_UI})
target_link_libraries(videowidgettest ${QTGSTREAMER_UI_LIBRARIES})
qt4_wrap_ui(VIDEOWIDGETPIPELINETEST_UI videowidgetpipelinetest.ui)
-automoc4_add_executable(videowidgetpipelinetest videowidgetpipelinetest.cpp ${VIDEOWIDGETPIPELINETEST_UI})
+add_executable(videowidgetpipelinetest videowidgetpipelinetest.cpp ${VIDEOWIDGETPIPELINETEST_UI})
target_link_libraries(videowidgetpipelinetest ${QTGSTREAMER_UI_LIBRARIES})
qt4_wrap_ui(VIDEOORIENTATIONTEST_UI videoorientationtest.ui)
-automoc4_add_executable(videoorientationtest videoorientationtest.cpp ${VIDEOORIENTATIONTEST_UI})
+add_executable(videoorientationtest videoorientationtest.cpp ${VIDEOORIENTATIONTEST_UI})
target_link_libraries(videoorientationtest ${QTGSTREAMER_UI_LIBRARIES})