Skip to content

Commit

Permalink
Merge pull request #5 from brunoabinader/build-osx
Browse files Browse the repository at this point in the history
Add basic support for OSX build
  • Loading branch information
tmpsantos committed Jun 5, 2015
2 parents e06a4c2 + 529a972 commit 9beedc8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Makefile
build
*.o
mason_packages
.qmake.stash
33 changes: 33 additions & 0 deletions qmapboxgl.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Note: remember to keep these versions up to date.
LIBUV_VERSION=0.10.28
SQLITE_VERSION=3.8.8.1

SUBDIRS = example

QT += widgets
Expand All @@ -6,6 +10,35 @@ TEMPLATE = app

CONFIG += link_pkgconfig opengl c++11 debug

macx {
!system(which mason >/dev/null) {
MASON_URL=https://github.com/mapbox/mason installation
error(Mason not found; Please follow the installation steps in $$join(MASON_URL, $$LITERAL_HASH))
}

message(Checking for libuv $$LIBUV_VERSION ...)
!system(mason install libuv $$LIBUV_VERSION >/dev/null) {
error(unable to install libuv $$LIBUV_VERSION - please check your internet connection)
}

message(Checking for sqlite $$SQLITE_VERSION ...)
!system(mason install sqlite $$SQLITE_VERSION >/dev/null) {
error(unable to install sqlite $$SQLITE_VERSION - please check your internet connection)
}

# Qt disables pkg-config by default on OSX.
QT_CONFIG -= no-pkg-config

# MapboxGL static libs depends on these specific dependency versions.
LIBS += \
$$system(mason ldflags libuv 0.10.28) \
$$system(mason prefix libuv 0.10.28)/lib/libuv.a \
$$system(mason ldflags sqlite 3.8.8.1) \
$$system(mason prefix sqlite 3.8.8.1)/lib/libsqlite3.a \
-framework Foundation \
-framework ApplicationServices
}

PKGCONFIG += libmbgl

SOURCES += example/example.cpp \
Expand Down

0 comments on commit 9beedc8

Please sign in to comment.