Unsolved How to build poppler-qml-plugin to use in android app?
-
Hey, I'm trying to build the poppler-qml-plugin (found here) to use it in a QML android app.
For that, I need to build poppler itself and that's where I'm stuck.My Setup:
Windows 10
Qt 5.15.3
Qt Creator 4.15.0
NDK 21.3.6528147What I did so far:
I tried to build poppler (21.05.0) using cmake. As presumed, there are plenty of thirdparty libs needed.
If I understand the build process correctly, I have to build those libs with the same compiler that I use to build my app.
So I'm using Qt Creator to open the corresponding CMakeLists.txt, configure the project for the target architecture and build several libs successfully (freetype, zlib, tiff, openjpeg). Problem is, I'm reaching a point where the requested libs are not provided with cmake build processes (for example cairo, pkgconfig and boost).
Additionally, cmake displays an error regarding openjpeg which is not very helpful:CMake Error at [...]/OpenJPEGConfig.cmake:41 (message): ooops
OpenJPEGConfig.cmake:
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake) # This is an install tree include(${SELF_DIR}/OpenJPEGTargets.cmake) set(INC_DIR "[...]/OPENJPEG/include/openjpeg-2.4") get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE) else() if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake) # This is a build tree set( OPENJPEG_INCLUDE_DIRS ) include(${SELF_DIR}/OpenJPEGExports.cmake) else() message(FATAL_ERROR "ooops") endif() endif()
The only occurence of one of the wanted .cmake files (OpenJPEGTargets.cmake) is deep down in the build folder (BUILD_DIR/CMakeFiles/Export/lib/openjpeg-2.4) but obviously it is not found by the script.
As I didn't find a specific include dir for openjpeg, I set the JPEG_INCLUDE_DIR var to the build dir itself - are there any better targets for that var? I'm surprised that there are almost no header and/or source files in the openjpeg folders...So, if anyone has successfully build the poppler-qml-plugin or poppler itself on android using Qt Creator, I would be grateful for any tip...