mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Add a target to generate Liblinphone's JavaDoc
This commit is contained in:
parent
2056181844
commit
5aa97cae22
3 changed files with 31 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." YES)
|
|||
option(ENABLE_DATE "Use build date in internal version number." NO)
|
||||
cmake_dependent_option(ENABLE_DAEMON "Enable the linphone daemon interface." YES "NOT WIN32" NO)
|
||||
option(ENABLE_DOC "Enable documentation generation with Doxygen." YES)
|
||||
option(ENABLE_JAVADOC "Add a target to generate documentation for Java API" NO)
|
||||
option(ENABLE_GTK_UI "Turn on or off compilation of gtk interface." YES)
|
||||
option(ENABLE_LDAP "Enable LDAP support." NO)
|
||||
option(ENABLE_LIME "Enable Instant Messaging Encryption." YES)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,25 @@ if (ENABLE_DOC)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_JAVADOC)
|
||||
find_package(Java REQUIRED)
|
||||
set(JAVADOC_PACKAGES "org.linphone.core org.linphone.mediastream")
|
||||
set(JAVADOC_CLASSPATHS
|
||||
"${PROJECT_SOURCE_DIR}/java/common"
|
||||
"${PROJECT_SOURCE_DIR}/java/j2se"
|
||||
"${PROJECT_SOURCE_DIR}/mediastreamer2/java/src"
|
||||
)
|
||||
string(REPLACE ";" ":" JAVADOC_CLASSPATHS "${JAVADOC_CLASSPATHS}")
|
||||
set(JAVADOC_TITLE "Linphone SDK ${PROJECT_VERSION} reference documentation")
|
||||
set(JAVADOC_JAVA_REFERENCE "http://docs.oracle.com/javase/8/docs/api/")
|
||||
set(JAVADOC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc/java")
|
||||
set(JAVADOC_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/javadoc.log")
|
||||
configure_file("generate_javadoc.sh.in" "generate_javadoc.sh" @ONLY)
|
||||
add_custom_target(javadoc
|
||||
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/generate_javadoc.sh"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (ENABLE_TOOLS)
|
||||
set(USE_BUNDLE )
|
||||
if (IOS)
|
||||
|
|
|
|||
11
coreapi/help/generate_javadoc.sh.in
Executable file
11
coreapi/help/generate_javadoc.sh.in
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
packages='@JAVADOC_PACKAGES@'
|
||||
classpaths='@JAVADOC_CLASSPATHS@'
|
||||
title='@JAVADOC_TITLE@'
|
||||
javaref='@JAVADOC_JAVA_REFERENCE@'
|
||||
outputdir='@JAVADOC_OUTPUT_DIR@'
|
||||
|
||||
@Java_JAVADOC_EXECUTABLE@ ${packages} -classpath ${classpaths} -doctitle "${title}" -link ${javaref} -d ${outputdir} 2>&1 | tee @JAVADOC_LOGFILE@
|
||||
grep -E '^[0-9]{1,3} errors?' @JAVADOC_LOGFILE@ &> /dev/null && exit 1
|
||||
exit 0
|
||||
Loading…
Add table
Reference in a new issue