
Mon, 01/06/2025 - 13:09
Forums:
Hello, I'm trying to build for android. But I run into this issue
CMake Error at CMakeLists.txt:923 (message):
Could not find libraries of used third-party products:
3RDPARTY_FREETYPE_LIBRARY_DIR
I believe I'm on the latest version of 7.8. I disabled BUILD_MODULE_Draw, and downloaded the android 3rd party Freetype.
I'm on windows 11.
Any idea what i'm doing wrong?
Thank you!
Mon, 01/06/2025 - 16:05
Hello. You need manually add path to lib. CMake is flexible, but can't find any options. Please manually add to cmake command -D 3RDPARTY_FREETYPE_DIR=...
Draw is not related to FreeType.
Best regards, Dmitrii.
Mon, 01/06/2025 - 22:39
Thanks for replying. I've added it but I still receive the error.
3RDPARTY_FREETYPE_DIR=C:/freetype-2.7.1-android
I've tried switching folders and everything I could think of but it continues to fail.
Tue, 01/07/2025 - 00:36
Do you building STATIC version or shared version of OCCT?
In case of SHARED you will be able to force set all variables, they will be not searched. Or if you don't plan to use FreeType (display text), then you can disable it (-D USE_FREETYPE=OFF).
I had no issue with freetype. Can you try to use VCPKG? vcpkg must to work with no issue for android. To use VCPKG, you will need remove old build folder and configure new with BUILD_USE_VCPKG=ON. And then use path to vcpkg and triplet type (Android support | Microsoft Learn). For now it is on testing. But still you can use official OCCT version (7.8.1) vcpkg package - opencascade. It is not beta, but have less options.
Best regards, Dmitrii.
Tue, 01/07/2025 - 01:39
I'm not sure what are the STATIC and SHARED versions are.
The files are from https://dev.opencascade.org/release.
I downloaded opencascade-7.8.0.zip and 3rdparty-vc14-64.zip and Freetype 2.7.1 (3rd Party Components -> android).
I put them all under the c:/OCCT directory.
My android.toolchain.config.cmake
set (CMAKE_SYSTEM_NAME Android)
set (CMAKE_SYSTEM_VERSION 24) # API level
set (CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set (CMAKE_ANDROID_NDK "C:/Users/Alejandro/AppData/Local/Android/Sdk/ndk/27.0.12077973")
set (CMAKE_ANDROID_STL_TYPE c++_static)
I used the cmake gui and source is C:/OCCT/OCCT-7_8_0
where to build C:/OCCT/build. I se the 3rd party dir to C:/OCCT/3rdparty-vc14-64
3RDPARTY_FREETYPE_DIR = C:/OCCT/freetype-2.7.1-android
and configured it then ran into the same issue.
Am I doing anything wrong in my steps above?
I'll upload a photo
Tue, 01/07/2025 - 01:49
Oh, "libs" interesting folder name. Probably it is our custom delivery, I usually compile manually it. So, to solve issue you need to manually add path to lib. 3RDPARTY_FREETYPE_LIBRARY= C:/OCCT/freetype-2.7.1-android.7z\freetype-2.7.1-android\libs\arm64-v8a/libfreetype.so. DIR must be reference to the folder with lib (you need to choose the system (one from these 3).
Best regards, Dmitrii.
Tue, 01/07/2025 - 04:48
I was able to configure and generate. Thank you very much Dmitri!