Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
5aa97cae
Commit
5aa97cae
authored
Oct 03, 2016
by
François Grisez
Browse files
Add a target to generate Liblinphone's JavaDoc
parent
20561818
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
CMakeLists.txt
CMakeLists.txt
+1
-0
coreapi/help/CMakeLists.txt
coreapi/help/CMakeLists.txt
+19
-0
coreapi/help/generate_javadoc.sh.in
coreapi/help/generate_javadoc.sh.in
+11
-0
No files found.
CMakeLists.txt
View file @
5aa97cae
...
...
@@ -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
)
...
...
coreapi/help/CMakeLists.txt
View file @
5aa97cae
...
...
@@ -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
)
...
...
coreapi/help/generate_javadoc.sh.in
0 → 100755
View file @
5aa97cae
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment