Skip to content

Commit

Permalink
[CORE] Copy doc compiled by gradle in the install directory
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGNEAU Romain committed Jan 30, 2025
1 parent b9ffb6e commit 6148b56
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmake/android/android_gradle_projects.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if(NOT INSTALL_CREATE_DISTRIB)
set(ANDROID_INSTALL_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
endif()

file(WRITE "${VISP_BINARY_DIR}/root_android.txt" "${ANDROID_BUILD_BASE_DIR}")

# BUG: Ninja generator generates broken targets with ANDROID_ABI_FILTER name (CMake 3.11.2)
#set(__spaces " ")
#string(REPLACE "\n" "\n${__spaces}" ANDROID_ABI_FILTER "${__spaces}${ANDROID_BUILD_ABI_FILTER}")
Expand Down
19 changes: 17 additions & 2 deletions platforms/android/build_sdk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import os, sys
from distutils.dir_util import copy_tree
import argparse
import glob
import re
Expand Down Expand Up @@ -219,8 +220,8 @@ def build_library(self, abi, do_install):
BUILD_ANDROID_EXAMPLES="ON",
BUILD_ANDROID_SERVICE="ON",
INSTALL_ANDROID_EXAMPLES="ON",
CMAKE_C_FLAGS="-fopenmp -static-openmp",
CMAKE_CXX_FLAGS="-fopenmp -static-openmp",
CMAKE_C_FLAGS="-fopenmp",
CMAKE_CXX_FLAGS="-fopenmp",
)
if self.ninja_path != 'ninja':
cmake_vars['CMAKE_MAKE_PROGRAM'] = self.ninja_path
Expand Down Expand Up @@ -248,6 +249,20 @@ def build_library(self, abi, do_install):
execute([self.ninja_path, "install" if (self.debug_info or self.debug) else "install/strip"])

def build_javadoc(self):
confFilePath = os.path.join(self.libdest, "root_android.txt")
confFileExists = os.path.exists(confFilePath)
print("Looking for file \"" + str(confFilePath) + "\"")
if confFileExists:
print("\tIt exists !")
line = ""
with open(confFilePath, "r") as file:
line = file.readline()
print("-> Read \"" + line + "\"")
rootJavadoc = os.path.join(line, "visp", "build", "docs", "javadoc")
print("\t->Copying content of \"" + str(rootJavadoc) + "\"")
copy_tree(rootJavadoc, self.docdest)
else:
print("\tIt DOES NOT exist =(")
classpaths = []
for dir, _, files in os.walk(os.environ["ANDROID_SDK"]):
for f in files:
Expand Down

0 comments on commit 6148b56

Please sign in to comment.