-
-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Description
Hello, I am trying to build a rust library for iOS.
I have the following snippet:
corrosion_import_crate(
MANIFEST_PATH Cargo.toml
CRATE_TYPES staticlib
CRATES foo
PROFILE dev
FEATURES apple
)
add_library(foocpp STATIC support/compat.cpp)
target_link_libraries(foocpp PUBLIC foo)
It's straightforward: a rust library with extern "C" exported functions and a simple cpp snippet that uses those bindings and builds on top of them simple C++ functions that can be used easily from C++ projects.
Then I run the following:
cmake -B cmake_build -G Xcode \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DIOS=true
and finally:
cmake --build cmake_build --config Debug --target ALL_BUILD
After building finishes, the libfoocpp.a ends up correctly in cmake_build/Debug-iphoneos/libfoocpp.a while the libfoo.a ends up in cmake_build/libfoo.a (wrong). So basically corrosion somehow messes up the xcode output directory as it doesn't take into account theCONFIGURATION (Debug) and the CMAKE_OSX_SYSROOT (iphoneos).
How can we fix this ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels