Skip to content

A toolchain file and examples using cmake for iOS development

Notifications You must be signed in to change notification settings

ryan-fork/ios-cmake

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cd samples/hello-lib
mkdir -p build.ios
cd build.ios
# default platform OS
cmake \
	-DCMAKE_TOOLCHAIN_FILE=../../../toolchain/iOS.cmake -GXcode ..
# target platform OS64COMBINED
cmake -IOS_PLATFORM=OS64COMBINED \
	-DCMAKE_TOOLCHAIN_FILE=../../../toolchain/iOS.cmake -GXcode ..
	
# -DCMAKE_OSX_ARCHITECTURES=arm64 \

# Open XCode and build the install target 
# or Simply type: 
xcodebuild -target install -configuration Debug

Options

  • Set -DPLATFORM to "SIMULATOR" to build for iOS simulator 32 bit (i386) DEPRECATED
  • Set -DPLATFORM to "SIMULATOR64" (example above) to build for iOS simulator 64 bit (x86_64)
  • Set -DPLATFORM to "OS" to build for Device (armv7, armv7s, arm64)
  • Set -DPLATFORM to "OS64" to build for Device (arm64)
  • Set -DPLATFORM to "OS64COMBINED" to build for Device & Simulator (FAT lib) (arm64, x86_64)
  • Set -DPLATFORM to "TVOS" to build for tvOS (arm64)
  • Set -DPLATFORM to "TVOSCOMBINED" to build for tvOS & Simulator (arm64, x86_64)
  • Set -DPLATFORM to "SIMULATOR_TVOS" to build for tvOS Simulator (x86_64)
  • Set -DPLATFORM to "WATCHOS" to build for watchOS (armv7k, arm64_32)
  • Set -DPLATFORM to "WATCHOSCOMBINED" to build for watchOS & Simulator (armv7k, arm64_32, i386)
  • Set -DPLATFORM to "SIMULATOR_WATCHOS" to build for watchOS Simulator (i386)

About

A toolchain file and examples using cmake for iOS development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published