Skip to content

Commit

Permalink
Add basic support for OSX build
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader committed Jun 4, 2015
1 parent cfd3b04 commit 04bb3d1
Showing 1 changed file with 33 additions and 0 deletions.
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 04bb3d1

Please sign in to comment.