How to create an Xcode project from an existing git cmake project?

I'm new to OSx, can anyone help create an Xcode project from existing code? I want to try some Xcode features, such as profile.

I am currently using Clion for my cmake project, it is also in git repo. I just want to import it from Xcode, but it's not that simple, I think. Here is some information about the project and the IDE:

  • This is just a console application written in C ++ and the cmake project
  • It is also on git repo
  • Xcode Version 8.0 (8A218a)
  • OS El Capitan 10.11.6

If you need more information, I can give more. Thanks for the help.

+6
source share
2 answers

Cmake has a generator for Xcode. Try:

cmake -G Xcode <dir of CMakeLists.txt> 
+9
source

What am I doing:

"File" → "New" → "Project ..."

Select a command line tool:

enter image description here

Fill in some things if you want:

enter image description here

Run the dummy project:

enter image description here

Click the project file and add the files to your project:

enter image description here

Go to your source heap. Expand the options. I prefer to use "added folders" as "Create Groups":

enter image description here

Go through and trim the files you don't want:

enter image description here

Build. You will probably need to delete files or add them until your project runs.

0
source

Source: https://habr.com/ru/post/1014369/


All Articles