Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] NDK path with spaces doesn't work in CMakeToolchain #17378

Closed
kambala-decapitator opened this issue Nov 25, 2024 · 1 comment · Fixed by #17379
Closed

[bug] NDK path with spaces doesn't work in CMakeToolchain #17378

kambala-decapitator opened this issue Nov 25, 2024 · 1 comment · Fixed by #17379
Milestone

Comments

@kambala-decapitator
Copy link
Contributor

Describe the bug

macOS 14.7, Conan v2.9.2

If NDK path contains spaces, then it's inserted in the toolchain file as is and cmake doesn't like it of course. Example:

conan install -c tools.android:ndk_path=/Volumes/Android\ NDK\ r27c/AndroidNDK12479018.app/Contents/NDK ...

then at cmake configure time there'll be error like:

CMake Error at conan-android64-25/conan_toolchain.cmake:39 (include):
  include called with invalid argument:
  r27c/AndroidNDK12479018.app/Contents/NDK/build/cmake/android.toolchain.cmake
Call Stack (most recent call first):
  /Users/kambala/dev/vcmi/build-android64/CMakeFiles/3.31.0/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:6 (project)

Embedding quotes inside the path also doesn't help:

conan install -c tools.android:ndk_path='"/Volumes/Android NDK r27c/AndroidNDK12479018.app/Contents/NDK"' ...
...
CMake Error at conan-android64-25/conan_toolchain.cmake:39 (include):
  include requested file is a directory:

    /Volumes/Android NDK r27c/AndroidNDK12479018.app/Contents/NDK
Call Stack (most recent call first):
  /Users/kambala/dev/vcmi/build-android64/CMakeFiles/3.31.0/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:6 (project)

Adding the config to a profile instead results in exactly the same issues.

How to reproduce it

pass -c tools.android:ndk_path='/some/path with spaces' to conan install and check the generated toolchain file or try to configure a CMake project with it

@kambala-decapitator
Copy link
Contributor Author

opened #17379 to fix it

@memsharded memsharded added this to the 2.10.0 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants