Added a new Cocoa dynamic framework target target to the main OS X Xcode project. The target is based on the template provided by Xcode. It contains headers and source files in the darwin/ and osx/ subdirectories. Headers are explicitly marked public or project-internal instead of implicitly by subdirectory. Removed the osxsdk target from platform.gypi. The SDK target has a few dependencies that are managed by mason. Transform the config.gypi generated by configure into an .xcconfig file that Xcode uses to fill in compiler and linker flags. Added a CI scheme that builds the All aggregate target generated by gyp and the osxapp and SDK test targets.
95 lines
2.4 KiB
Python
95 lines
2.4 KiB
Python
{
|
|
'variables': {
|
|
'loop_lib': 'darwin',
|
|
'headless_lib': 'cgl',
|
|
},
|
|
'xcode_settings': {
|
|
# Force all build output to the build directory. Must
|
|
# be an absolute path or xcodebuild will ignore it.
|
|
'SYMROOT': '<!(cd ../../build/osx-x86_64 && pwd)',
|
|
},
|
|
'includes': [
|
|
'../../mbgl.gypi',
|
|
'../../test/test.gypi',
|
|
'../../bin/glfw.gypi',
|
|
'../../bin/render.gypi',
|
|
'../../bin/offline.gypi',
|
|
],
|
|
'targets': [
|
|
{
|
|
'target_name': 'test',
|
|
'type': 'executable',
|
|
|
|
'dependencies': [
|
|
'test-lib',
|
|
'platform-lib',
|
|
],
|
|
|
|
'sources': [
|
|
'../../test/src/main.cpp',
|
|
],
|
|
},
|
|
{
|
|
'target_name': 'platform-lib',
|
|
'product_name': 'mbgl-platform-osx',
|
|
'type': 'static_library',
|
|
'standalone_static_library': 1,
|
|
'hard_dependency': 1,
|
|
'dependencies': [
|
|
'core',
|
|
],
|
|
|
|
'include_dirs': [
|
|
'include',
|
|
'../darwin/include',
|
|
'../default',
|
|
'../../include',
|
|
'../../src', # TODO: eliminate
|
|
],
|
|
|
|
'sources': [
|
|
'../default/asset_file_source.cpp',
|
|
'../default/default_file_source.cpp',
|
|
'../default/online_file_source.cpp',
|
|
'../default/mbgl/storage/offline.hpp',
|
|
'../default/mbgl/storage/offline.cpp',
|
|
'../default/mbgl/storage/offline_database.hpp',
|
|
'../default/mbgl/storage/offline_database.cpp',
|
|
'../default/mbgl/storage/offline_download.hpp',
|
|
'../default/mbgl/storage/offline_download.cpp',
|
|
'../default/sqlite3.hpp',
|
|
'../default/sqlite3.cpp',
|
|
'../darwin/src/http_file_source.mm',
|
|
'../darwin/src/log_nslog.mm',
|
|
'../darwin/src/string_nsstring.mm',
|
|
'../darwin/src/image.mm',
|
|
'../darwin/src/nsthread.mm',
|
|
'../darwin/src/reachability.m',
|
|
],
|
|
|
|
'xcode_settings': {
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
'<@(boost_cflags)',
|
|
'<@(sqlite_cflags)',
|
|
'<@(zlib_cflags)',
|
|
'<@(rapidjson_cflags)',
|
|
'<@(variant_cflags)',
|
|
],
|
|
'CLANG_ENABLE_OBJC_ARC': 'YES',
|
|
'CLANG_ENABLE_MODULES': 'YES',
|
|
},
|
|
|
|
'link_settings': {
|
|
'libraries': [
|
|
'<@(sqlite_static_libs)',
|
|
'<@(zlib_static_libs)',
|
|
'$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
|
|
],
|
|
'xcode_settings': {
|
|
'OTHER_LDFLAGS': [ '<@(zlib_ldflags)' ],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|