summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-08-10 16:11:00 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2011-08-10 16:11:00 +0300
commit04ad40bd4b6595027f31c21595c460e65187af4f (patch)
tree6be63a2eb7c050a11cad8229adfca9e8fffc27a3 /CMakeLists.txt
parenta5487083433341783733858b5c153b759053f032 (diff)
Add option to not build and use codegen.
This is especially useful for crosscompiling. The gen.cpp files will be added in another commit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 18 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31b2a3e..e1708b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ set(QTGSTREAMER_VERSION 0.10.1.1)
option(QTGSTREAMER_STATIC "Build QtGStreamer as a static library" OFF)
option(QTGSTREAMER_TESTS "Build QtGStreamer's tests" OFF)
option(QTGSTREAMER_EXAMPLES "Build QtGStreamer's examples" ON)
+option(QTGSTREAMER_CODEGEN "Build and use QtGStreamer's codegen" OFF)
option(USE_GST_PLUGIN_DIR "Install plugins together with the other gstreamer plugins" ON)
include(MacroLogFeature)
@@ -50,13 +51,20 @@ macro_log_feature(GLIB2_FOUND "GLib" "Required to build QtGLib" "http://www.gtk.
find_package(GObject)
macro_log_feature(GOBJECT_FOUND "GObject" "Required to build QtGLib" "http://www.gtk.org/" TRUE)
-find_package(FLEX)
-macro_log_feature(FLEX_FOUND "Flex" "Required to build codegen, a helper code generator"
- "http://flex.sourceforge.net/" TRUE)
+if (QTGSTREAMER_CODEGEN AND CMAKE_CROSSCOMPILING)
+ message(WARNING "Codegen use requested, but we are crosscompiling. Disabling...")
+ set(QTGSTREAMER_CODEGEN OFF)
+endif()
+
+if (QTGSTREAMER_CODEGEN)
+ find_package(FLEX)
+ macro_log_feature(FLEX_FOUND "Flex" "Required to build codegen, a helper code generator"
+ "http://flex.sourceforge.net/" TRUE)
-find_package(BISON)
-macro_log_feature(BISON_FOUND "Bison" "Required to build codegen, a helper code generator"
- "http://www.gnu.org/software/bison/" TRUE)
+ find_package(BISON)
+ macro_log_feature(BISON_FOUND "Bison" "Required to build codegen, a helper code generator"
+ "http://www.gnu.org/software/bison/" TRUE)
+endif()
if (CMAKE_COMPILER_IS_GNUCXX)
@@ -72,7 +80,10 @@ else()
set(PLUGINS_INSTALL_DIR ${LIB_INSTALL_DIR}/gstreamer-0.10)
endif()
-add_subdirectory(codegen)
+if (QTGSTREAMER_CODEGEN AND FLEX_FOUND AND BISON_FOUND)
+ add_subdirectory(codegen)
+endif()
+
add_subdirectory(src)
add_subdirectory(elements)