From e3228cb8ab377c4bf1263a784341272972ddce4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Fri, 16 Jun 2017 14:30:58 +0200 Subject: [PATCH] Remaking doc directory aborescence Fix Doxyfile.in --- coreapi/help/CMakeLists.txt | 69 +------------------ coreapi/help/{ => doc/doxygen}/Doxyfile.in | 4 +- coreapi/help/{ => doc/doxygen}/doxygen.dox | 0 coreapi/help/{ => doc}/generate_javadoc.sh.in | 0 coreapi/help/examples/C/CMakeLists.txt | 44 ++++++++++++ coreapi/help/{ => examples/C}/buddy_status.c | 0 coreapi/help/{ => examples/C}/chatroom.c | 0 coreapi/help/{ => examples/C}/filetransfer.c | 0 coreapi/help/{ => examples/C}/helloworld.c | 0 coreapi/help/{ => examples/C}/notify.c | 0 .../{ => examples/C}/realtimetext_receiver.c | 0 .../{ => examples/C}/realtimetext_sender.c | 0 coreapi/help/{ => examples/C}/registration.c | 0 .../core/tutorials/TutorialBuddyStatus.java | 0 .../core/tutorials/TutorialChatRoom.java | 0 .../core/tutorials/TutorialHelloWorld.java | 0 .../core/tutorials/TutorialNotifier.java | 0 .../core/tutorials/TutorialRegistration.java | 0 18 files changed, 48 insertions(+), 69 deletions(-) rename coreapi/help/{ => doc/doxygen}/Doxyfile.in (99%) rename coreapi/help/{ => doc/doxygen}/doxygen.dox (100%) rename coreapi/help/{ => doc}/generate_javadoc.sh.in (100%) create mode 100644 coreapi/help/examples/C/CMakeLists.txt rename coreapi/help/{ => examples/C}/buddy_status.c (100%) rename coreapi/help/{ => examples/C}/chatroom.c (100%) rename coreapi/help/{ => examples/C}/filetransfer.c (100%) rename coreapi/help/{ => examples/C}/helloworld.c (100%) rename coreapi/help/{ => examples/C}/notify.c (100%) rename coreapi/help/{ => examples/C}/realtimetext_receiver.c (100%) rename coreapi/help/{ => examples/C}/realtimetext_sender.c (100%) rename coreapi/help/{ => examples/C}/registration.c (100%) rename coreapi/help/{ => examples}/java/org/linphone/core/tutorials/TutorialBuddyStatus.java (100%) rename coreapi/help/{ => examples}/java/org/linphone/core/tutorials/TutorialChatRoom.java (100%) rename coreapi/help/{ => examples}/java/org/linphone/core/tutorials/TutorialHelloWorld.java (100%) rename coreapi/help/{ => examples}/java/org/linphone/core/tutorials/TutorialNotifier.java (100%) rename coreapi/help/{ => examples}/java/org/linphone/core/tutorials/TutorialRegistration.java (100%) diff --git a/coreapi/help/CMakeLists.txt b/coreapi/help/CMakeLists.txt index 6eafc4665..0d44e0aa7 100644 --- a/coreapi/help/CMakeLists.txt +++ b/coreapi/help/CMakeLists.txt @@ -20,71 +20,6 @@ # ############################################################################ -if (ENABLE_DOC OR ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER) - find_package(Doxygen) - if(DOXYGEN_FOUND) - if(DOXYGEN_DOT_FOUND) - set(top_srcdir "${CMAKE_CURRENT_LIST_DIR}/../../") - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) - set(DOC_INPUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox - ${LINPHONE_HEADER_FILES} - ) - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml/index.xml" - COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - DEPENDS ${DOC_INPUT_FILES} - ) - add_custom_target(linphone-doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml/index.xml") - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/html" "${CMAKE_CURRENT_BINARY_DIR}/doc/xml" - DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/linphone-${LINPHONE_VERSION}") - else() - if (ENABLE_CXX_WRAPPER) - message(FATAL_ERROR "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.") - else() - message(WARNING "The dot program is needed to generate the linphone documentation. You can get it from http://www.graphviz.org/.") - endif() - endif() - endif() -endif() +add_subdirectory(examples/C) +add_subdirectory(doc) -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 ALL - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/generate_javadoc.sh" - ) -endif() - -if (ENABLE_TOOLS) - set(USE_BUNDLE ) - if (IOS) - set(USE_BUNDLE MACOSX_BUNDLE) - endif() - file(GLOB EXECUTABLES_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") - foreach(EXECUTABLE ${EXECUTABLES_SOURCE}) - string(REPLACE ".c" "" EXECUTABLE_NAME ${EXECUTABLE}) - bc_apply_compile_flags(${EXECUTABLE} STRICT_OPTIONS_CPP STRICT_OPTIONS_C) - add_executable(${EXECUTABLE_NAME} ${USE_BUNDLE} ${EXECUTABLE}) - target_link_libraries(${EXECUTABLE_NAME} ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES}) - set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}") - if (NOT IOS) - install(TARGETS ${EXECUTABLE_NAME} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) - endif() - endforeach() -endif() diff --git a/coreapi/help/Doxyfile.in b/coreapi/help/doc/doxygen/Doxyfile.in similarity index 99% rename from coreapi/help/Doxyfile.in rename to coreapi/help/doc/doxygen/Doxyfile.in index 40d2bf95a..7cbc56f4a 100644 --- a/coreapi/help/Doxyfile.in +++ b/coreapi/help/doc/doxygen/Doxyfile.in @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = doc +OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -849,7 +849,7 @@ EXCLUDE_SYMBOLS = # command). EXAMPLE_PATH = @top_srcdir@ \ - @top_srcdir@/coreapi/help + @top_srcdir@/coreapi/help/examples/C # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and diff --git a/coreapi/help/doxygen.dox b/coreapi/help/doc/doxygen/doxygen.dox similarity index 100% rename from coreapi/help/doxygen.dox rename to coreapi/help/doc/doxygen/doxygen.dox diff --git a/coreapi/help/generate_javadoc.sh.in b/coreapi/help/doc/generate_javadoc.sh.in similarity index 100% rename from coreapi/help/generate_javadoc.sh.in rename to coreapi/help/doc/generate_javadoc.sh.in diff --git a/coreapi/help/examples/C/CMakeLists.txt b/coreapi/help/examples/C/CMakeLists.txt new file mode 100644 index 000000000..af59a648a --- /dev/null +++ b/coreapi/help/examples/C/CMakeLists.txt @@ -0,0 +1,44 @@ +############################################################################ +# CMakeLists.txt +# Copyright (C) 2017 Belledonne Communications, Grenoble France +# +############################################################################ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################ +if (ENABLE_TOOLS) + set(USE_BUNDLE ) + if (IOS) + set(USE_BUNDLE MACOSX_BUNDLE) + endif() + file(GLOB EXECUTABLES_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") + foreach(EXECUTABLE ${EXECUTABLES_SOURCE}) + string(REPLACE ".c" "" EXECUTABLE_NAME ${EXECUTABLE}) + bc_apply_compile_flags(${EXECUTABLE} STRICT_OPTIONS_CPP STRICT_OPTIONS_C) + add_executable(${EXECUTABLE_NAME} ${USE_BUNDLE} ${EXECUTABLE}) + target_link_libraries(${EXECUTABLE_NAME} ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES}) + set_target_properties(${EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}") + if (NOT IOS) + install(TARGETS ${EXECUTABLE_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) + endif() + endforeach() +endif() + diff --git a/coreapi/help/buddy_status.c b/coreapi/help/examples/C/buddy_status.c similarity index 100% rename from coreapi/help/buddy_status.c rename to coreapi/help/examples/C/buddy_status.c diff --git a/coreapi/help/chatroom.c b/coreapi/help/examples/C/chatroom.c similarity index 100% rename from coreapi/help/chatroom.c rename to coreapi/help/examples/C/chatroom.c diff --git a/coreapi/help/filetransfer.c b/coreapi/help/examples/C/filetransfer.c similarity index 100% rename from coreapi/help/filetransfer.c rename to coreapi/help/examples/C/filetransfer.c diff --git a/coreapi/help/helloworld.c b/coreapi/help/examples/C/helloworld.c similarity index 100% rename from coreapi/help/helloworld.c rename to coreapi/help/examples/C/helloworld.c diff --git a/coreapi/help/notify.c b/coreapi/help/examples/C/notify.c similarity index 100% rename from coreapi/help/notify.c rename to coreapi/help/examples/C/notify.c diff --git a/coreapi/help/realtimetext_receiver.c b/coreapi/help/examples/C/realtimetext_receiver.c similarity index 100% rename from coreapi/help/realtimetext_receiver.c rename to coreapi/help/examples/C/realtimetext_receiver.c diff --git a/coreapi/help/realtimetext_sender.c b/coreapi/help/examples/C/realtimetext_sender.c similarity index 100% rename from coreapi/help/realtimetext_sender.c rename to coreapi/help/examples/C/realtimetext_sender.c diff --git a/coreapi/help/registration.c b/coreapi/help/examples/C/registration.c similarity index 100% rename from coreapi/help/registration.c rename to coreapi/help/examples/C/registration.c diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java b/coreapi/help/examples/java/org/linphone/core/tutorials/TutorialBuddyStatus.java similarity index 100% rename from coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java rename to coreapi/help/examples/java/org/linphone/core/tutorials/TutorialBuddyStatus.java diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java b/coreapi/help/examples/java/org/linphone/core/tutorials/TutorialChatRoom.java similarity index 100% rename from coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java rename to coreapi/help/examples/java/org/linphone/core/tutorials/TutorialChatRoom.java diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java b/coreapi/help/examples/java/org/linphone/core/tutorials/TutorialHelloWorld.java similarity index 100% rename from coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java rename to coreapi/help/examples/java/org/linphone/core/tutorials/TutorialHelloWorld.java diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialNotifier.java b/coreapi/help/examples/java/org/linphone/core/tutorials/TutorialNotifier.java similarity index 100% rename from coreapi/help/java/org/linphone/core/tutorials/TutorialNotifier.java rename to coreapi/help/examples/java/org/linphone/core/tutorials/TutorialNotifier.java diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java b/coreapi/help/examples/java/org/linphone/core/tutorials/TutorialRegistration.java similarity index 100% rename from coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java rename to coreapi/help/examples/java/org/linphone/core/tutorials/TutorialRegistration.java