question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How can I crosscompile to iOS with cmake?

See original GitHub issue

I’ve tried the steps described here: https://docs.conan.io/en/1.45/integrations/cross_platform/ios.html

Which leads to: image

I then downloaded a iOS toolchain file. I don’t know which one to use, since the documentation is really unspecific about it, so I googled and found this one: https://github.com/leetal/ios-cmake

Calling cmake with the toolchain file cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=../ios.toolchain.cmake -DPLATFORM=OS64 ..

just leads to

CMake Error at build_test/conanbuildinfo_multi.cmake:31 (message):
  Framework library Cocoa not found in paths:
Call Stack (most recent call first):
  build_test/conanbuildinfo_release.cmake:229 (conan_find_apple_frameworks)
  build_test/conanbuildinfo_multi.cmake:1463 (include)
  cmake/DependenciesFunctions.cmake:259 (include)
  CMakeLists.txt:86 (resolve_conan_dependencies)

I do have all the necessary frameworks, and I can build swiftUI projects with Xcode just fine.

Is there any documentation on how I can cross build my cmake project for iOS with Conan? I really don’t know how I could get this to work. 😕

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SimplyLizcommented, Apr 11, 2022

Thank you! Your profile seems to work, I’ve added it in my conan_cmake_install call and now it does something… (fails with openal, but that’s something different). Could you maybe update the documentation? This helped me a lot 😃

0reactions
paulocoutinhoxcommented, May 4, 2022

Hi,

I recommend you check my project: https://nativium.github.io/

Have everything about this ready to use for all platforms.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling for iOS with CMake - c++
I am using coturn master for Turn client library. I have successfully generated cmake build but the file libturnutils.a is mac os compatible....
Read more >
problems following the CMake library & cross compiling ...
Hi, I am tying to combine the CMake library tutorial and Cross Compiling (https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html# ...
Read more >
Add iOS cross-compiling documentation to the cmake ...
Hi, The cross-compilation guide at https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling is getting better and ...
Read more >
Cmake – cross-compilation of C ++ project for iOS - Apple
I have a C ++ project, and I want to cross-compile it for my iOS project. I'm really not an expert on C...
Read more >
Frequently Asked Questions
Cross -compiling for iOS ; A lightweight version of Essentia for iOS can be compiled using the --cross-compile-ios flag. It requires reducing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found