-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# | ||
# fastrtps_build_catalyst.sh | ||
# Copyright © 2020 Dmitriy Borovikov. All rights reserved. | ||
# | ||
set -e | ||
|
||
echo $CONFIGURATION # Build type | ||
CATALYST_PRODUCTS_DIR="${BUILT_PRODUCTS_DIR}-maccatalyst" | ||
if [ -f "$CATALYST_PRODUCTS_DIR/fastrtps/lib/libfastrtps.a" ]; then | ||
echo Already build $CATALYST_PRODUCTS_DIR/fastrtps/lib/libfastrtps.a | ||
exit 0 | ||
fi | ||
|
||
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl hw.ncpu | awk '{print $2}') | ||
|
||
if [ ! -d memory ]; then | ||
git clone --quiet --recurse-submodules --depth 1 -b ios $Foonathan_memory_repo memory | ||
fi | ||
rm -rf "$PROJECT_TEMP_DIR/memory" | ||
mkdir -p "$PROJECT_TEMP_DIR/memory" || true | ||
cmake -Smemory -B"$PROJECT_TEMP_DIR/memory" \ | ||
-DCMAKE_INSTALL_PREFIX=$CATALYST_PRODUCTS_DIR/fastrtps \ | ||
-DCMAKE_TOOLCHAIN_FILE=$SRCROOT/maccatalyst.toolchain.cmake \ | ||
-DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF \ | ||
-DFOONATHAN_MEMORY_BUILD_TESTS=OFF \ | ||
-DFOONATHAN_MEMORY_BUILD_TOOLS=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release | ||
cmake --build "$PROJECT_TEMP_DIR/memory" --target install | ||
|
||
rm -rf "$PROJECT_TEMP_DIR/Fast-RTPS" | ||
if [ ! -d Fast-RTPS ]; then | ||
git clone --quiet --recurse-submodules --depth 1 $FastRTPS_repo Fast-RTPS | ||
fi | ||
mkdir -p "$PROJECT_TEMP_DIR/Fast-RTPS" || true | ||
cmake -SFast-RTPS -B"$PROJECT_TEMP_DIR/Fast-RTPS" \ | ||
-DCMAKE_INSTALL_PREFIX=$CATALYST_PRODUCTS_DIR/fastrtps \ | ||
-DCMAKE_TOOLCHAIN_FILE=$SRCROOT/maccatalyst.toolchain.cmake \ | ||
-Dfoonathan_memory_DIR=$CATALYST_PRODUCTS_DIR/fastrtps/share/foonathan_memory/cmake \ | ||
-DSQLITE3_SUPPORT=OFF \ | ||
-DTHIRDPARTY=ON \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DCMAKE_BUILD_TYPE=$CONFIGURATION | ||
cmake --build "$PROJECT_TEMP_DIR/Fast-RTPS" --target install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
unset(CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH) | ||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") | ||
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx") | ||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst") | ||
set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15") | ||
set(CMAKE_C_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option") | ||
set(CMAKE_CXX_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option") |