diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/open-scene-graph.rb | 33 |
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() |
