]> granicus.if.org Git - libjpeg-turbo/commitdiff
BUILDING.md: Correct iOS/Android examples
authorDRC <information@libjpeg-turbo.org>
Mon, 2 Jul 2018 16:42:06 +0000 (11:42 -0500)
committerDRC <information@libjpeg-turbo.org>
Mon, 2 Jul 2018 16:42:06 +0000 (11:42 -0500)
toolchain.cmake should be created in the build directory, so the scripts
need to cd to that directory before generating that file.

Closes #254

BUILDING.md

index 429963ea41980d296cea2a7e6ce2417b17016f95..2ebc6e0d9c06d4d327f3807c8b4e68a419d84dd6 100644 (file)
@@ -416,13 +416,14 @@ iPhone 3GS-4S/iPad 1st-3rd Generation and newer:
     IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
     export CFLAGS="-mfloat-abi=softfp -march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -miphoneos-version-min=3.0"
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Darwin)
     set(CMAKE_SYSTEM_PROCESSOR arm)
     set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
       [additional CMake flags] {source_directory}
@@ -441,13 +442,14 @@ Same as above, but replace the first line with:
     export CFLAGS="-mfloat-abi=softfp -arch armv7 -miphoneos-version-min=3.0"
     export ASMFLAGS="-no-integrated-as"
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Darwin)
     set(CMAKE_SYSTEM_PROCESSOR arm)
     set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
       [additional CMake flags] {source_directory}
@@ -467,13 +469,14 @@ iPhone 5/iPad 4th Generation and newer:
     IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
     export CFLAGS="-Wall -mfloat-abi=softfp -march=armv7s -mcpu=swift -mtune=swift -mfpu=neon -miphoneos-version-min=6.0"
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Darwin)
     set(CMAKE_SYSTEM_PROCESSOR arm)
     set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
       [additional CMake flags] {source_directory}
@@ -498,13 +501,14 @@ iPhone 5S/iPad Mini 2/iPad Air and newer.
     IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
     export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=7.0 -funwind-tables"
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Darwin)
     set(CMAKE_SYSTEM_PROCESSOR aarch64)
     set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
       [additional CMake flags] {source_directory}
@@ -545,6 +549,8 @@ needs.
     export LDFLAGS=-pie
     TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Linux)
     set(CMAKE_SYSTEM_PROCESSOR arm)
@@ -552,7 +558,6 @@ needs.
     set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/${HOST})
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
       [additional CMake flags] {source_directory}
@@ -582,6 +587,8 @@ needs.
     export LDFLAGS=-pie
     TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Linux)
     set(CMAKE_SYSTEM_PROCESSOR aarch64)
@@ -589,7 +596,6 @@ needs.
     set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/${HOST})
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
       [additional CMake flags] {source_directory}
@@ -619,6 +625,8 @@ needs.
     export LDFLAGS=-pie
     TOOLCHAIN=${NDK_PATH}/toolchains/x86-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Linux)
     set(CMAKE_SYSTEM_PROCESSOR i386)
@@ -626,7 +634,6 @@ needs.
     set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/${HOST})
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
       [additional CMake flags] {source_directory}
@@ -656,6 +663,8 @@ needs.
     export LDFLAGS=-pie
     TOOLCHAIN=${NDK_PATH}/toolchains/x86_64-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
 
+    cd {build_directory}
+
     cat <<EOF >toolchain.cmake
     set(CMAKE_SYSTEM_NAME Linux)
     set(CMAKE_SYSTEM_PROCESSOR x86_64)
@@ -663,7 +672,6 @@ needs.
     set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/${HOST})
     EOF
 
-    cd {build_directory}
     cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
       -DCMAKE_POSITION_INDEPENDENT_CODE=1 \
       [additional CMake flags] {source_directory}