Skip to content

Commit

Permalink
Use odr.core built with pdf2htmlEX
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Aug 15, 2024
1 parent 53769d1 commit 0f54f6c
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 1,222 deletions.
7 changes: 0 additions & 7 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ target_link_libraries(odr-core
add_library(envvar SHARED src/main/cpp/EnvVar.c)
set_target_properties(envvar PROPERTIES LINKER_LANGUAGE C)

add_library(pdf2htmlEX-android SHARED src/main/cpp/pdf2htmlEX.cc src/main/cpp/CCharGC.h)
find_package(pdf2htmlEX REQUIRED CONFIG)
target_link_libraries(pdf2htmlEX-android
pdf2htmlex::pdf2htmlex
log
)

FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/build/assets")
function(copy_assets sourcevar dstsubdir)
if(DEFINED "${sourcevar}")
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {

externalNativeBuild {
cmake {
targets "odr-core", "envvar", "pdf2htmlEX-android"
targets "odr-core", "envvar"
arguments(
"-DCMAKE_TOOLCHAIN_FILE=build/conan/android_toolchain.cmake",
// We can migrate to static STL once all C++ deps are in conan and linked as one .so library
Expand Down
7 changes: 3 additions & 4 deletions app/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
required_conan_version = ">=2.0.6"


class pdf2htmlEXConan(ConanFile):
class OdrDroidConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
# Remove pdf2htmlex dep once https://github.com/opendocument-app/OpenDocument.core/pull/380 is merged
requires = "odrcore/4.1.1@", "pdf2htmlex/0.18.8.rc1-20240814-git"
requires = "odrcore/4.1.0-pdf2htmlex-20240815-git"

def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)

tc = CMakeToolchain(self)
# @TODO: figure out how to use POPPLER_DATA_DIR exported by poppler-data
tc.variables["POPPLER_DATA_RES_DIR"] = self.dependencies['poppler-data'].cpp_info.resdirs[0]
tc.variables["PDF2HTMLEX_RES_DIR"] = self.dependencies['pdf2htmlex'].cpp_info.resdirs[0]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 0 additions & 46 deletions app/src/main/cpp/CCharGC.h

This file was deleted.

Loading

0 comments on commit 0f54f6c

Please sign in to comment.