# How to add an iOS app to an existing plugin project using CMake/CLion

**URL:** <https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800>\
**Category:** MacOSX and iOS\
**Created:** [November 18, 2022, 6:59pm UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800 "2022-11-18T18:59:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [November 18, 2022, 6:59pm UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/1 "2022-11-18T18:59:00Z")

</div>

I have an audio plugin project using CMake & CLion and want to add an iOS version. I’ve never used anything but Xcode for an iOS project and not sure what the workflow would be. Any tips would be appreciated.

---

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [November 19, 2022, 1:49am UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/2 "2022-11-19T01:49:40Z")

</div>

I can’t even get an ios app to build using CMake. Looking at the Juce CMake API, I tried this:

`cmake -Bbuild-ios -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0`

I get this error:

```auto
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring juceaide
CMake Error at /Programming/JUCE/extras/Build/juceaide/CMakeLists.txt:128 (message):

Failed to configure juceaide
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:26 (project):
No CMAKE_C_COMPILER could be found.

```

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [November 20, 2022, 10:28am UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/3 "2022-11-20T10:28:05Z")

</div>

Hi. Do you have the xcode command line tools installed?

> **[Xcode Command Line Tools · Mac Install Guide](https://mac.install.guide/commandlinetools/index.html)**
>
> How to install Xcode Command Line Tools. Also updating and uninstalling. A complete guide with FAQ from the author of the book, Learn Ruby on Rails.

---

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [November 21, 2022, 2:45am UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/4 "2022-11-21T02:45:09Z")

</div>

I had the command line tools installed and up to date.

After much hair pulling, turns out that I needed to update cmake. I had 3.23 installed and once I updated it to the latest, 3.25 via brew, it worked perfectly on the command line. But then I noticed that it wouldn’t build in CLion, which was using 3.23 internally. I pointed it to the brew 3.25 version and all was fine.

I’m guessing this had to do with the Xcode 14 update.

---

<div class="post-metadata">

**Author:** ![kcoul](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kcoul](https://forum.juce.com/u/kcoul)\
**Post date:** [November 22, 2022, 12:46am UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/5 "2022-11-22T00:46:17Z")

</div>

Have you tried using this toolchain yet? It’s working well for me.

> **[GitHub - leetal/ios-cmake: A CMake toolchain file for iOS, macOS, watchOS...](https://github.com/leetal/ios-cmake)**
>
> A CMake toolchain file for iOS, macOS, watchOS & tvOS C/C++/Obj-C++ development - GitHub - leetal/ios-cmake: A CMake toolchain file for iOS, macOS, watchOS & tvOS C/C++/Obj-C++ development

---

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [November 22, 2022, 1:03am UTC](https://forum.juce.com/t/how-to-add-an-ios-app-to-an-existing-plugin-project-using-cmake-clion/53800/6 "2022-11-22T01:03:16Z")

</div>

No need…I got it working by updating cmake. Also, that link doesn’t show support for Xcode 14. Thanks though.
