diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-13 05:14:48 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-13 05:14:48 +0000 |
commit | b85b4d9e54caef0585d308ef3bffee21d0e5ae56 (patch) | |
tree | a1ebeec149a57be4589ad6cabcd26c597703407c /libs/pbd | |
parent | 520bc1bed49720333eb1a2be3ea0f813ccaac182 (diff) |
make ardour3 build and link on OS X (tiger, at least)
git-svn-id: svn://localhost/ardour2/branches/3.0@8018 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/cocoa_open_uri.mm | 19 | ||||
-rw-r--r-- | libs/pbd/openuri.cc | 1 | ||||
-rw-r--r-- | libs/pbd/wscript | 8 |
3 files changed, 27 insertions, 1 deletions
diff --git a/libs/pbd/cocoa_open_uri.mm b/libs/pbd/cocoa_open_uri.mm new file mode 100644 index 0000000000..2c6822ac94 --- /dev/null +++ b/libs/pbd/cocoa_open_uri.mm @@ -0,0 +1,19 @@ +#include <CoreFoundation/CFLocale.h> +#import <CoreFoundation/CFString.h> +#import <Foundation/NSString.h> +#import <Foundation/NSAutoreleasePool.h> +#import <AppKit/NSWorkspace.h> + +bool +cocoa_open_url (const char* uri) +{ + NSString* struri = [[NSString alloc] initWithUTF8String:uri]; + NSURL* nsurl = [[NSURL alloc] initWithString:struri]; + + bool ret = [[NSWorkspace sharedWorkspace] openURL:nsurl]; + + [struri release]; + [nsurl release]; + + return ret; +} diff --git a/libs/pbd/openuri.cc b/libs/pbd/openuri.cc index 7c51dc55e9..403aff07c7 100644 --- a/libs/pbd/openuri.cc +++ b/libs/pbd/openuri.cc @@ -26,3 +26,4 @@ PBD::open_uri (const char* uri) #endif #endif } + diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 45fc2c8027..e707be68df 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -2,6 +2,7 @@ import autowaf import os import sys +import TaskGen # Version of this package (even if built as a child) MAJOR = '4' @@ -106,7 +107,11 @@ def build(bld): obj.includes = ['.'] obj.name = 'libpbd' obj.target = 'pbd' - obj.uselib = 'GLIBMM SIGCPP XML UUID' + obj.uselib = 'GLIBMM SIGCPP XML UUID SNDFILE' + if sys.platform == 'darwin': + TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc'] + obj.source += 'cocoa_open_uri.mm' + obj.uselib += ' OSX' obj.vnum = LIBPBD_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.cxxflags = ['-DPACKAGE="libpbd"'] @@ -127,6 +132,7 @@ def build(bld): testobj.uselib = 'CPPUNIT XML SNDFILE' testobj.uselib_local = 'libpbd' + def shutdown(): autowaf.shutdown() |