8000 GitHub - LinyiWu/xcode-cmake: Extracts build configurations from existing xcode project to cmake.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

LinyiWu/xcode-cmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xcode-cmake

A command line tool which extracts build configurations for cmake, from existing xcode project.

Usage

Using hello in this repository as an example.

cd /path/to/this/repo

Generate cmake files from xcode project.pbxproj

mkdir -p cmake/
plutil -convert json -o cmake/project.json hello/project.pbxproj
./xcode-cmake.py -i cmake/project.json -o cmake/

It generates project-level build settings to cmake/xcode_attr.cmake, and target-level build settings to cmake/${targetName}.cmake. These files are included by CMakeLists.txt.

Then generate xcode project files using cmake.

mkdir -p build/
cmake -GXcode -S ./ -B build/

NOTE:

  • project.pbxproj refers to Info.plist by relative path(hello/Info.plist), so the generated cmake/hello.cmake behaves the same. Put CMakeLists.txt in the parent directory of hello if you want to include target-level cmake files.

  • Included settings could be overwritten, provided that configuration variant is explicitly stated. See set_target_properties in CMakeLists.txt for example.

Why another xcode/ios cmake tool

I hope cmake generated projects have xcode-default warnings enabled (see Xcode -> PROJECT -> Build Settings -> Apple Clang - Warnings).

About

Extracts build configurations from existing xcode project to cmake.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0