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

Migrating to develop2 - My experience #502

Open
paulocoutinhox opened this issue Mar 29, 2023 · 5 comments
Open

Migrating to develop2 - My experience #502

paulocoutinhox opened this issue Mar 29, 2023 · 5 comments

Comments

@paulocoutinhox
Copy link

Hi,

I will post here my experience when migrate to branch develop2.

Im making this for my project XPLPC here:
https:/xplpc/xplpc/tree/support-conan-cross

Thanks.

@paulocoutinhox
Copy link
Author

For desktop all "c" and "cxx" targets are OK.

@paulocoutinhox
Copy link
Author

For Android im getting this error:

======== Installing packages ========
ERROR: There are invalid packages:
fmt/9.1.0: Invalid: 'settings.os.api_level' value not defined
spdlog/1.11.0: Invalid: 'settings.os.api_level' value not defined

What i need define to be captured by the conan cmake provider?

Command:

cmake -S . -B /Users/paulo/Developer/workspaces/cpp/xplpc/build/kotlin/armeabi-v7a -DXPLPC_TARGET=kotlin -DXPLPC_ADD_CUSTOM_DATA=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DXPLPC_DEPENDENCY_TOOL=conan -DCMAKE_TOOLCHAIN_FILE=/Applications/AndroidNDK.app/Contents/NDK/build/cmake/android.toolchain.cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=build/conan/conan_provider.cmake

Can you help me here @memsharded?

@paulocoutinhox
Copy link
Author

paulocoutinhox commented Mar 29, 2023

For macOS Swift tests it is OK.

For iOS im getting this error:

======== Installing packages ========
ERROR: There are invalid packages:
fmt/9.1.0: Invalid: 'settings.os.version' value not defined
spdlog/1.11.0: Invalid: 'settings.os.version' value not defined

What i need define to be captured by the conan cmake provider?

Command:

cmake -S . -B /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/ios/arm64 -GXcode -DCMAKE_TOOLCHAIN_FILE=/Users/paulo/Developer/workspaces/cpp/xplpc/cmake/ios/ios.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DXPLPC_TARGET=swift -DXPLPC_ADD_CUSTOM_DATA=ON -DXPLPC_DEPENDENCY_TOOL=conan -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DSDK_VERSION=11.0 -DARCHS=arm64 -DENABLE_ARC=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=build/conan/conan_provider.cmake

Can you help me here @memsharded?

@paulocoutinhox
Copy link
Author

For WebAssembly im getting this error:

======== Finalizing install (deploy, generators) ========
conanfile.py (xplpc/None): Writing generators to /Users/paulo/Developer/workspaces/cpp/xplpc/build/wasm/conan
conanfile.py (xplpc/None): Generator 'CMakeDeps' calling 'generate()'
conanfile.py (xplpc/None): Generator 'CMakeToolchain' calling 'generate()'
conanfile.py (xplpc/None): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (xplpc/None): Preset 'conan-release' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-release'
conanfile.py (xplpc/None): If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/paulo/Developer/workspaces/cpp/xplpc/build/wasm/conan/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
conanfile.py (xplpc/None): CMakeToolchain generated: CMakePresets.json
conanfile.py (xplpc/None): CMakeToolchain generated: ../../../CMakeUserPresets.json
conanfile.py (xplpc/None): Generating aggregated env files
conanfile.py (xplpc/None): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished succesfully
-- CMake-conan: CONAN_GENERATORS_FOLDER=/Users/paulo/Developer/workspaces/cpp/xplpc/build/wasm/conan
CMake Error at build/conan/conan_support.cmake:184 (find_package):
  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  cmake/conan/conan_dependency.cmake:1 (find_package)
  CMakeLists.txt:78 (include)

It not an error with conan, because it build, but cmake can't find the dependencies. Maybe the CMAKE_MODULE_PATH or CMAKE_PREFIX_PATH was not defined to this case.

Command:

cmake -S . -B /Users/paulo/Developer/workspaces/cpp/xplpc/build/wasm -DXPLPC_TARGET=wasm -DXPLPC_ADD_CUSTOM_DATA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/Users/paulo/Developer/workspaces/cpp/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DXPLPC_DEPENDENCY_TOOL=conan -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=build/conan/conan_provider.cmake

Can you help me here @memsharded?

@ssrobins
Copy link
Contributor

Hi @paulocoutinhox, Android support is now on develop2 if you want to try it out. You should just be able to use the documented inputs for the Android toolchain to get it to work. If you want specific commands to try out, I recommend starting with the ones in the smoke test.

iOS support is currently under review.

I haven't tried an Emscripten build yet, but I was getting a similar error with the Android toolchain that has since been fixed. More details here. If it's still not working, happy to take a look.

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

No branches or pull requests

2 participants