Closed linuxaged closed 3 years ago
Hi, the
Could NOT find Corrade (missing: CORRADE_INCLUDE_DIR
_CORRADE_CONFIGURE_FILE)
is one of the "usual crosscompiling issues" that CMake suffers from. Did you try with -DCMAKE_FIND_ROOT_PATH=/Users/jjj/workspace/ios-libs
as I suggested on Gitter? That usually helps.
I have no idea what the Polly toolchain does, looks like it ignored the iOS installation altogether and found the native Corrade/Magnum in /usr/local
instead, which is just wrong.
With -DCMAKE_FIND_ROOT_PATH=/Users/jjj/workspace/ios-libs
i got the same error:
➜ build-ios git:(master) cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-DBUILD_STATIC=ON \
-DWITH_IMGUI=ON \
-DIMGUI_DIR=/Users/jjj/workspace/imgui \
-DCMAKE_INSTALL_PREFIX=/Users/jjj/workspace/ios-libs \
-DCMAKE_PREFIX_PATH=/Users/jjj/workspace/ios-libs \
-DCMAKE_FIND_ROOT_PATH=/Users/jjj/workspace/ios-libs \
-G Xcode
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- 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
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Corrade (missing: CORRADE_INCLUDE_DIR
_CORRADE_CONFIGURE_FILE)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
modules/FindCorrade.cmake:311 (find_package_handle_standard_args)
modules/FindMagnum.cmake:233 (find_package)
CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/jjj/workspace/magnum-integration/build-ios/CMakeFiles/CMakeOutput.log".
:eyes:
Stupid question, but ... /Users/jjj/workspace/ios-libs/include/Corrade/configure.h
exists, right? This worked for building Magnum, right? There has to be something different between how you built Magnum and this which causes the error.
Oh my fault, have not checked that.
So ~
not parsed correctly in zsh, the Corrade i built was not installed in ~/workspace/ios-libs
. absolute path should be used.
The correct script i'm using:
交叉编译 corrade
mkdir build-ios && cd build-ios
cmake .. -G Xcode \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-DCMAKE_INSTALL_PREFIX=/Users/jjj/workspace/ios-libs \
-DBUILD_STATIC=ON
cmake --build . --config Release --target install
交叉编译 magnum
mkdir build-ios && cd build-ios
cmake .. -G Xcode \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-DBUILD_STATIC=ON \
-DBUILD_PLUGINS_STATIC=ON \
-DTARGET_GLES2=OFF \
-DCMAKE_INSTALL_PREFIX=/Users/jjj/workspace/ios-libs \
-DCMAKE_PREFIX_PATH=/Users/jjj/workspace/ios-libs
cmake --build . --config Release --target install
交叉编译 magnum-integration
cmake .. -G Xcode \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/generic/iOS.cmake \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-DBUILD_STATIC=ON \
-DWITH_IMGUI=ON \
-DIMGUI_DIR=/Users/jjj/workspace/imgui \
-DCMAKE_INSTALL_PREFIX=/Users/jjj/workspace/ios-libs \
-DCMAKE_PREFIX_PATH=/Users/jjj/workspace/ios-libs
cmake --build . --config Release --target install
So
~
not parsed correctly in zsh
Soo ... you ended up with a folder literally named ~
? :sweat_smile: If that's so, I'm happy with my Bash and don't ever want to use anything else, haha :)
Xcode 12.2 iOS SDK 14.2 CMake 3.19.1
have tried both default magnum toolchain and polly toolchain.
with magnum default toolchain:
with polly toolchain: