Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS build dir config #1965

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ endif
@cd platforms/ios && \
jazzy --config jazzy.yml



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra space

# This rule includes steps to copy necessary workspace settings into a user-specific location in the iOS workspace.
# See platforms/ios/DEVELOPING.md for details.
cmake-ios:
cmake -H. -B${IOS_BUILD_DIR} ${IOS_CMAKE_PARAMS}
@mkdir -p platforms/ios/Tangram.xcworkspace/xcuserdata/${USER}.xcuserdatad
@cp platforms/ios/WorkspaceSettings.xcsettings platforms/ios/Tangram.xcworkspace/xcuserdata/${USER}.xcuserdatad/WorkspaceSettings.xcsettings

ios-framework: cmake-ios
xcodebuild -workspace platforms/ios/Tangram.xcworkspace -scheme TangramMap -configuration ${BUILD_TYPE} -sdk iphoneos ${XCPRETTY}
Expand Down
27 changes: 25 additions & 2 deletions platforms/ios/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,30 @@ execute_process(COMMAND xcrun --sdk iphoneos --show-sdk-version OUTPUT_VARIABLE

# Configure the API key in the Info.plist for the demo app.
set(NEXTZEN_API_KEY $ENV{NEXTZEN_API_KEY})
configure_file(${PROJECT_SOURCE_DIR}/platforms/ios/demo/Info.plist.in ${PROJECT_BINARY_DIR}/Info.plist)

configure_file(
${PROJECT_SOURCE_DIR}/platforms/ios/demo/Info.plist.in
${PROJECT_BINARY_DIR}/Info.plist)

set(CONFIG_DIR ${PROJECT_SOURCE_DIR}/platforms/ios)
set(TEMPLATE_DIR ${CONFIG_DIR}/templates)
# Sets @PROJECT_BINARY_DIR@
configure_file(
${TEMPLATE_DIR}/contents.xcworkspacedata
${CONFIG_DIR}/Tangram.xcworkspace/contents.xcworkspacedata
@ONLY)

# Sets @PROJECT_BINARY_DIR@
configure_file(
${TEMPLATE_DIR}/WorkspaceSettings.xcsettings
${CONFIG_DIR}/Tangram.xcworkspace/xcuserdata/$ENV{USER}.xcuserdatad/WorkspaceSettings.xcsettings
@ONLY)

# Sets @PROJECT_BINARY_DIR@
configure_file(
${TEMPLATE_DIR}/project.pbxproj
${CONFIG_DIR}/demo/TangramDemo.xcodeproj/project.pbxproj
@ONLY)

# Tell SQLiteCpp to not build its own copy of SQLite, we will use the system library instead.
if (IOS_SDK_VERSION VERSION_LESS 11.0)
Expand Down Expand Up @@ -68,7 +91,7 @@ set(TANGRAM_FRAMEWORK_SOURCES
platforms/ios/framework/src/TGURLHandler.mm
)

### Configure dynamic framework build target.
### Configure dynamic framework build target.

add_library(TangramMap SHARED
${TANGRAM_FRAMEWORK_SOURCES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataCustomLocation</key>
<string>../../build/ios/DerivedData</string>
<string>@PROJECT_BINARY_DIR@/DerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>WorkspaceRelativePath</string>
<key>EnabledFullIndexStoreVisibility</key>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

/* Begin PBXFileReference section */
D20C4A54212B6D93005BDB9A /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
D222B92321642BCA007E6FD6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../../../build/ios/Info.plist; sourceTree = "<group>"; };
D222B92321642BCA007E6FD6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = @PROJECT_BINARY_DIR@/Info.plist; sourceTree = "<group>"; };
D298721620D05D8E009A0AB8 /* TangramDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TangramDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
D298723020D05F6E009A0AB8 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
D298723120D05F6E009A0AB8 /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -386,12 +386,12 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = ../../../build/ios/Info.plist;
INFOPLIST_FILE = @PROJECT_BINARY_DIR@/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mapzen.ios.TangramDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../../build/ios;
SYMROOT = @PROJECT_BINARY_DIR@;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -403,13 +403,13 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = ../../../build/ios/Info.plist;
INFOPLIST_FILE = @PROJECT_BINARY_DIR@/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mapzen.ios.TangramDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../../build/ios;
SYMROOT = @PROJECT_BINARY_DIR@;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -420,14 +420,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
HEADER_SEARCH_PATHS = ../../../build/ios/Include;
INFOPLIST_FILE = ../../../build/ios/Info.plist;
HEADER_SEARCH_PATHS = @PROJECT_BINARY_DIR@/Include;
INFOPLIST_FILE = @PROJECT_BINARY_DIR@/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.mapzen.ios.TangramDemo-static";
PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../../build/ios;
SYMROOT = @PROJECT_BINARY_DIR@;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -438,14 +438,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
HEADER_SEARCH_PATHS = ../../../build/ios/Include;
INFOPLIST_FILE = ../../../build/ios/Info.plist;
HEADER_SEARCH_PATHS = @PROJECT_BINARY_DIR@/Include;
INFOPLIST_FILE = @PROJECT_BINARY_DIR@/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.mapzen.ios.TangramDemo-static";
PRODUCT_NAME = "$(TARGET_NAME)";
SYMROOT = ../../../build/ios;
SYMROOT = @PROJECT_BINARY_DIR@;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down