Skip to content

Commit

Permalink
osg3: Fix building on OSX 10.8
Browse files Browse the repository at this point in the history
We can't use our own compilers. We must use Apple's for their block
extension, which their headers for Cocoa use heavily. Such is life.
  • Loading branch information
Zack Moratto committed Mar 29, 2014
1 parent 865ecb1 commit d038614
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,21 @@ class osg3(CMakePackage):
patches = 'patches/osg3'

def configure(self):
other_flags = ['-DBUILD_OSG_APPLICATIONS=ON', '-DCMAKE_VERBOSE_MAKEFILE=ON', '-DOSG_USE_QT=OFF', '-DBUILD_DOCUMENTATION=OFF']
if self.arch.os == 'osx':
other_flags.extend(['-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio','-DOSG_WINDOWING_SYSTEM=Cocoa'])
# Cocoa bindings can't be built unless using an apple
# provided compiler. Using a homebrew or macports built
# GCC or hand built clang will be missing the required
# 'blocks' extension. The error will look something like
# "NSTask.h: error: expected unqualified-id before '^'
# token".
self.env['CXX'] = 'g++'
self.env['CC'] = 'gcc'
super(osg3, self).configure(
with_='GDAL GLUT JPEG OpenEXR PNG ZLIB CURL QuickTime CoreVideo QTKit'.split(),
without='COLLADA FBX FFmpeg FLTK FOX FreeType GIFLIB Inventor ITK Jasper LibVNCServer OpenAL OpenVRML OurDCMTK Performer Qt3 Qt4 SDL TIFF wxWidgets Xine XUL RSVG NVTT DirectInput GtkGL Poppler-glib GTA'.split(),
other=['-DBUILD_OSG_APPLICATIONS=ON', '-DCMAKE_VERBOSE_MAKEFILE=ON', '-DOSG_USE_QT=OFF'])
other=other_flags)

class flann(CMakePackage):
src = 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip'
Expand Down

0 comments on commit d038614

Please sign in to comment.