summaryrefslogtreecommitdiff
path: root/uitask_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-19 23:53:10 -0400
committerPietro Gagliardi <[email protected]>2014-05-19 23:53:10 -0400
commit5f5f4f6c2adde30e1f15ff46b209c7e4312630f8 (patch)
tree34e4868503033459c8bb55698dfd517f4c7cd98d /uitask_darwin.go
parent946e007e5d19001ec643ee8d5cbda9b7e1b1b58b (diff)
Set up the Mac OS X build to always target Mac OS X 10.6 regardless of the host system; this is what we want and by default building on 10.8 produces binaries which won't run on 10.6. This isn't working yet, though: one enum in NSApplication.h becomes empty on 10.6...
Diffstat (limited to 'uitask_darwin.go')
-rw-r--r--uitask_darwin.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/uitask_darwin.go b/uitask_darwin.go
index f80d8b7..dce9479 100644
--- a/uitask_darwin.go
+++ b/uitask_darwin.go
@@ -8,7 +8,9 @@ import (
"unsafe"
)
-// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
+// #cgo CFLAGS: -mmacosx-version-min=10.6 -DMACOSX_DEPLOYMENT_TARGET=10.6
+// #cgo LDFLAGS: -mmacosx-version-min=10.6 -lobjc -framework Foundation -framework AppKit
+// /* application compatibilty stuff via https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html, http://www.cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html, http://opensource.apple.com/source/xnu/xnu-2422.1.72/EXTERNAL_HEADERS/AvailabilityMacros.h (via http://stackoverflow.com/questions/20485797/what-macro-to-use-to-identify-mavericks-osx-10-9-in-c-c-code), and Beelsebob and LookyLuke_ICBM on irc.freenode.net/#macdev */
// #include "objc_darwin.h"
import "C"