From cf34dca25f3c0e1a0fe97e4a5dfb2604b7e239da Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Wed, 21 Feb 2018 12:12:24 +0100 Subject: [PATCH] Changed the ReadMe file with a new format. Removed the main.dox file because it is no longer necessary. --- ReadMe_template.md | 86 +++++++++++++++++++++++++++++++++++ ReadMe_template.txt | 19 -------- main_template.dox | 107 -------------------------------------------- new_project.sh | 2 - 4 files changed, 86 insertions(+), 128 deletions(-) create mode 100755 ReadMe_template.md delete mode 100755 ReadMe_template.txt delete mode 100755 main_template.dox diff --git a/ReadMe_template.md b/ReadMe_template.md new file mode 100755 index 0000000..465d48e --- /dev/null +++ b/ReadMe_template.md @@ -0,0 +1,86 @@ +project_name {#mainpage} +============ + +## Description + +## Dependencies + +This package requires of the following system libraries and packages + +* [cmake](https://www.cmake.org "CMake's Homepage"), a cross-platform build system. +* [doxygen](http://www.doxygen.org "Doxygen's Homepage") and [graphviz](http://www.graphviz.org "Graphviz's Homepage") to generate the documentation. +* stdc++ and pthread libraries. + +Under linux all of these utilities are available in ready-to-use packages. + +Under MacOS most of the packages are available via [fink](http://www.finkproject.org/ "Fink's Homepage") + +This package also requires of the following IRI libraries: + +## Compilation and installation + +Download this repository and create a build folder inside: + +``` mkdir build ``` + +Inside the build folder execute the following commands: + +``` cmake .. ``` + +The default build mode is DEBUG. That is, objects and executables include debug information. + +The RELEASE build mode optimizes for speed. To build in this mode execute instead +``` cmake .. -DCMAKE_BUILD_TYPE=RELEASE ``` + +The release mode will be kept until next time cmake is executed. + +``` make ``` + +In case no errors are reported, the generated libraries (if any) will be located at the +_lib_ folder and the executables (if any) will be located at the _bin_ folder. + +In order to be able to use the library, it it necessary to copy it into the system. +To do that, execute + +``` make install ``` + +as root and the shared libraries will be copied to */usr/local/lib/iridrivers* directory +and the header files will be copied to */usr/local/include/iridrivers* dierctory. At +this point, the library may be used by any user. + +To remove the library from the system, exceute + +``` make uninstall ``` + +as root, and all the associated files will be removed from the system. + +To generate the documentation execute the following command: + +``` make doc ``` + +## How to use it + +To use this library in an other library or application, in the CMakeLists.txt file, first it is necessary to locate if the library has been installed or not using the following command + +``` FIND_PACKAGE(project_name) ``` + +In the case that the package is present, it is necessary to add the header files directory to the include directory path by using + +``` INCLUDE_DIRECTORIES(${project_name_INCLUDE_DIR}) ``` + +and it is also necessary to link with the desired libraries by using the following command + +``` TARGET_LINK_LIBRARIES(<executable name> ${project_name_LIBRARY}) ``` + +## Disclaimer + +Copyright (C) 2009-2018 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +Mantainer author_name (author_email) + +This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair or correction. + +In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see <http://www.gnu.org/licenses/> + diff --git a/ReadMe_template.txt b/ReadMe_template.txt deleted file mode 100755 index 34a1225..0000000 --- a/ReadMe_template.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2009-2010 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. -Author author_name (author_email@iri.upc.edu) -All rights reserved. - -This file is part of project_name library -project_name library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program. If not, see <http://www.gnu.org/licenses/> - - diff --git a/main_template.dox b/main_template.dox deleted file mode 100755 index 9d90ffa..0000000 --- a/main_template.dox +++ /dev/null @@ -1,107 +0,0 @@ -/*! \mainpage project_name - - \section Introduction - - \subsection Pre-Requisites - - This package requires of the following libraries and packages - - <A href="http://www.cmake.org">cmake</A>, a cross-platform build system. - - <A href="http://www.doxygen.org">doxygen</a> and - <A href="http://www.graphviz.org">graphviz</a> to generate the documentation. - - stdc++, - . - - Under linux all of these utilities are available in ready-to-use packages. - - Under MacOS most of the packages are available via <a href="http://www.finkproject.org/">fink</a>. <br> - - \subsection Compilation - - Just download this package, uncompress it, and execute - - cd build - - cmake .. - . - to generate the makefile and then - - make - . - to obtain the shared library (in this case called <em>iriutils.so</em>) and - also all the example programs. - - The <em>cmake</em> only need to be executed once (make will automatically call - <em>cmake</em> if you modify one of the <em>CMakeList.txt</em> files). - - To generate this documentation type - - make doc - . - - The files in the <em>build</em> directory are genetated by <em>cmake</em> - and <em>make</em> and can be safely removed. - After doing so you will need to call cmake manually again. - - \subsection Configuration - - The default build mode is DEBUG. That is, objects and executables - include debug information. - - The RELEASE build mode optimizes for speed. To build in this mode - execute - - cmake .. -DCMAKE_BUILD_TYPE=RELEASE - . - The release mode will be kept until next time cmake is executed. - - \subsection Installation - - In order to be able to use the library, it it necessary to copy it into the system. - To do that, execute - - - make install - . - - as root and the shared libraries will be copied to <em>/usr/local/lib/iriutils</em> directory - and the header files will be copied to <em>/usr/local/include/iriutils</em> dierctory. At - this point, the library may be used by any user. - - To remove the library from the system, exceute - - make uninstall - . - as root, and all the associated files will be removed from the system. - - \section Customization - - To build a new application using these library, first it is necessary to locate if the library - has been installed or not using the following command - - - FIND_PACKAGE(library_name REQUIRED) - - In the case that the package is present, it is necessary to add the header files directory to - the include directory path by using - - - INCLUDE_DIRECTORIES(${library_name_INCLUDE_DIR}) - - Finally, it is also nevessary to link with the desired libraries by using the following command - - - TARGET_LINK_LIBRARIES(<executable name> ${library_name_LIBRARY}) - . - - \section License - - This package is licensed under a - <a href="http://www.gnu.org/licenses/lgpl.html"> - LGPL 3.0 License</a>. - - \section Disclaimer - - This is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - */ diff --git a/new_project.sh b/new_project.sh index 906152d..c78632b 100755 --- a/new_project.sh +++ b/new_project.sh @@ -242,8 +242,6 @@ else sed 's/library_name/'$NAME'/g' <driver_example_src_template.cpp >./src/examples/${NAME}_test.cpp rm application_src_template.cpp fi -sed 's/library_name/'$NAME'/g' <main_template.dox >tmp.dox -sed 's/project_name/'"$PROJECT_NAME"'/g' <tmp.dox >./doc/main.dox rm driver_src_template.cpp rm driver_header_template.h rm driver_example_src_template.cpp -- GitLab