aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/open-scene-graph.rb
diff options
context:
space:
mode:
authorJens Cornelis2013-12-19 15:16:16 +0100
committerMike McQuaid2014-01-13 13:07:02 +0000
commit5cfe3d8b3587f52c55dacead0302e8c5f09897ca (patch)
tree4757672e065218fd4a501df089574c2e679aef15 /Library/Formula/open-scene-graph.rb
parentcd040bf5b04cdadfae934f92d9366f0688a0ea66 (diff)
downloadhomebrew-5cfe3d8b3587f52c55dacead0302e8c5f09897ca.tar.bz2
open-scene-graph: add qt, qt5 support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/open-scene-graph.rb')
-rw-r--r--Library/Formula/open-scene-graph.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/open-scene-graph.rb b/Library/Formula/open-scene-graph.rb
index da306007f..077f858cc 100644
--- a/Library/Formula/open-scene-graph.rb
+++ b/Library/Formula/open-scene-graph.rb
@@ -23,12 +23,20 @@ class OpenSceneGraph < Formula
depends_on 'collada-dom' => :optional
depends_on 'gnuplot' => :optional
depends_on 'ffmpeg' => :optional
+ depends_on 'qt5' => :optional
+ depends_on 'qt' => :optional
if build.include? 'docs'
depends_on 'doxygen'
depends_on 'graphviz'
end
+ def patches
+ # Fix osgQt for Qt 5.2
+ # Reported upstream http://forum.openscenegraph.org/viewtopic.php?t=13206
+ DATA
+ end
+
def install
ENV.cxx11 if build.cxx11?
@@ -52,6 +60,12 @@ class OpenSceneGraph < Formula
args << "-DCOLLADA_INCLUDE_DIR=#{HOMEBREW_PREFIX}/include/collada-dom"
end
+ if build.with? 'qt5'
+ args << "-DCMAKE_PREFIX_PATH=#{Formula.factory('qt5').opt_prefix}"
+ elsif build.with? 'qt'
+ args << "-DCMAKE_PREFIX_PATH=#{Formula.factory('qt').opt_prefix}"
+ end
+
args << '..'
mkdir 'build' do
@@ -65,3 +79,22 @@ class OpenSceneGraph < Formula
end
end
end
+
+__END__
+diff --git a/src/osgQt/CMakeLists.txt b/src/osgQt/CMakeLists.txt
+index 43afffe..6c62e73 100644
+--- a/src/osgQt/CMakeLists.txt
++++ b/src/osgQt/CMakeLists.txt
+@@ -13,7 +13,11 @@ SET(SOURCES_H
+ )
+
+ IF ( Qt5Widgets_FOUND )
+- QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
++ IF (Qt5Widgets_VERSION VERSION_LESS 5.2.0)
++ QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
++ ELSE()
++ QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} )
++ ENDIF()
+ ELSE()
+ QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
+ ENDIF()