mirror of
				https://github.com/arcan1s/netctl-gui.git
				synced 2025-10-30 21:23:41 +00:00 
			
		
		
		
	added doxygen documentation building
This commit is contained in:
		
							
								
								
									
										3
									
								
								PKGBUILD
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								PKGBUILD
									
									
									
									
									
								
							| @ -27,6 +27,7 @@ build() { | |||||||
|   cd "${srcdir}/build-plasmoid" |   cd "${srcdir}/build-plasmoid" | ||||||
|   cmake -DCMAKE_INSTALL_PREFIX=/usr \ |   cmake -DCMAKE_INSTALL_PREFIX=/usr \ | ||||||
|         -DCMAKE_BUILD_TYPE=Release \ |         -DCMAKE_BUILD_TYPE=Release \ | ||||||
|  |         -DBUILD_DOCS:BOOL=0 \ | ||||||
|         -DBUILD_GUI:BOOL=0 \ |         -DBUILD_GUI:BOOL=0 \ | ||||||
|         -DBUILD_LIBRARY:BOOL=0 \ |         -DBUILD_LIBRARY:BOOL=0 \ | ||||||
|         "../${pkgbase}" |         "../${pkgbase}" | ||||||
| @ -35,6 +36,7 @@ build() { | |||||||
|   cd "${srcdir}/build-qt4" |   cd "${srcdir}/build-qt4" | ||||||
|   cmake -DCMAKE_INSTALL_PREFIX=/usr \ |   cmake -DCMAKE_INSTALL_PREFIX=/usr \ | ||||||
|         -DCMAKE_BUILD_TYPE=Release \ |         -DCMAKE_BUILD_TYPE=Release \ | ||||||
|  |         -DBUILD_DOCS:BOOL=0 \ | ||||||
|         -DBUILD_DATAENGINE:BOOL=0 \ |         -DBUILD_DATAENGINE:BOOL=0 \ | ||||||
|         -DBUILD_PLASMOID:BOOL=0 \ |         -DBUILD_PLASMOID:BOOL=0 \ | ||||||
|         -DUSE_QT5:BOOL=0 \ |         -DUSE_QT5:BOOL=0 \ | ||||||
| @ -44,6 +46,7 @@ build() { | |||||||
|   cd "${srcdir}/build-qt5" |   cd "${srcdir}/build-qt5" | ||||||
|   cmake -DCMAKE_INSTALL_PREFIX=/usr \ |   cmake -DCMAKE_INSTALL_PREFIX=/usr \ | ||||||
|         -DCMAKE_BUILD_TYPE=Release \ |         -DCMAKE_BUILD_TYPE=Release \ | ||||||
|  |         -DBUILD_DOCS:BOOL=0 \ | ||||||
|         -DBUILD_DATAENGINE:BOOL=0 \ |         -DBUILD_DATAENGINE:BOOL=0 \ | ||||||
|         -DBUILD_PLASMOID:BOOL=0 \ |         -DBUILD_PLASMOID:BOOL=0 \ | ||||||
|         "../${pkgbase}" |         "../${pkgbase}" | ||||||
|  | |||||||
| @ -23,20 +23,22 @@ message (STATUS "Build date: ${CURRENT_DATE}") | |||||||
|  |  | ||||||
| # install options | # install options | ||||||
| option (USE_QT5 "Use Qt5 instead of Qt4" ON) | option (USE_QT5 "Use Qt5 instead of Qt4" ON) | ||||||
| option (BUILD_DOCS "Build documentation and install headers" ON) | # components | ||||||
| option (BUILD_GUI "Build GUI" ON) | option (BUILD_GUI "Build GUI" ON) | ||||||
| option (BUILD_LIBRARY "Build library" ON) | option (BUILD_LIBRARY "Build library" ON) | ||||||
| option (BUILD_DATAENGINE "Build data engine" ON) | option (BUILD_DATAENGINE "Build data engine" ON) | ||||||
| option (BUILD_PLASMOID "Build plasmoid" ON) | option (BUILD_PLASMOID "Build plasmoid" ON) | ||||||
| if (BUILD_DOCS) |  | ||||||
|     set (BUILD_LIBRARY ON) |  | ||||||
| endif () |  | ||||||
| if (BUILD_GUI) | if (BUILD_GUI) | ||||||
|     set (BUILD_LIBRARY ON) |     set (BUILD_LIBRARY ON) | ||||||
| endif () | endif () | ||||||
| if (BUILD_PLASMOID) | if (BUILD_PLASMOID) | ||||||
|     set (BUILD_DATAENGINE ON) |     set (BUILD_DATAENGINE ON) | ||||||
| endif () | endif () | ||||||
|  | # documentation | ||||||
|  | option (BUILD_DOCS "Build documentation and install headers" ON) | ||||||
|  | if (BUILD_DOCS) | ||||||
|  |     set (BUILD_LIBRARY ON) | ||||||
|  | endif () | ||||||
|  |  | ||||||
| # flags | # flags | ||||||
| if (CMAKE_COMPILER_IS_GNUCXX) | if (CMAKE_COMPILER_IS_GNUCXX) | ||||||
|  | |||||||
| @ -11,3 +11,9 @@ set (TARGETS "") | |||||||
| set (HEADERS "") | set (HEADERS "") | ||||||
|  |  | ||||||
| add_subdirectory (${SUBPROJECT_SOURCE_DIR}) | add_subdirectory (${SUBPROJECT_SOURCE_DIR}) | ||||||
|  | # headers | ||||||
|  | install (DIRECTORY ${SUBPROJECT_INCLUDE_DIR}/ DESTINATION include/) | ||||||
|  | # documentation | ||||||
|  | if (BUILD_DOCS) | ||||||
|  |     include (docs.cmake) | ||||||
|  | endif () | ||||||
|  | |||||||
							
								
								
									
										19
									
								
								sources/netctlgui/docs.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								sources/netctlgui/docs.cmake
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | # doxygen documentation | ||||||
|  | find_package (Doxygen) | ||||||
|  | if (NOT DOXYGEN_FOUND) | ||||||
|  |     message (STATUS "WARNING: Doxygen not found - Reference manual will not be created") | ||||||
|  |     return () | ||||||
|  | endif () | ||||||
|  |  | ||||||
|  | configure_file (doxygen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf) | ||||||
|  | add_custom_target (oxygen-docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf) | ||||||
|  |  | ||||||
|  | # man pages | ||||||
|  | # workaround for man pages | ||||||
|  | set (MAN_DIR ${CMAKE_CURRENT_BINARY_DIR}/docs/man/man3) | ||||||
|  | install (FILES ${MAN_DIR}/Netctl.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_Netctl.3) | ||||||
|  | install (FILES ${MAN_DIR}/NetctlProfile.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_NetctlProfile.3) | ||||||
|  | install (FILES ${MAN_DIR}/SleepThread.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_SleepThread.3) | ||||||
|  | install (FILES ${MAN_DIR}/WpaSup.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_WpaSup.3) | ||||||
|  | # html docs | ||||||
|  | install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/html DESTINATION share/doc/${SUBPROJECT}) | ||||||
							
								
								
									
										2321
									
								
								sources/netctlgui/doxygen.conf.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2321
									
								
								sources/netctlgui/doxygen.conf.in
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -14,6 +14,14 @@ | |||||||
|  *   You should have received a copy of the GNU General Public License     * |  *   You should have received a copy of the GNU General Public License     * | ||||||
|  *   along with netctl-gui. If not, see http://www.gnu.org/licenses/       * |  *   along with netctl-gui. If not, see http://www.gnu.org/licenses/       * | ||||||
|  ***************************************************************************/ |  ***************************************************************************/ | ||||||
|  | /** | ||||||
|  |  * @file sleepthread.h | ||||||
|  |  * Header of netctlgui library | ||||||
|  |  * @author Evgeniy Alekseev | ||||||
|  |  * @copyright GPLv3 | ||||||
|  |  * @bug https://github.com/arcan1s/netctl-gui/issues | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  |  | ||||||
| #ifndef SLEEPTHREAD_H | #ifndef SLEEPTHREAD_H | ||||||
| #define SLEEPTHREAD_H | #define SLEEPTHREAD_H | ||||||
| @ -21,21 +29,34 @@ | |||||||
| #include <QThread> | #include <QThread> | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * @brief The SleepThread class is used for sleep current thread in WpaSup class | ||||||
|  |  */ | ||||||
| class SleepThread : public QThread | class SleepThread : public QThread | ||||||
| { | { | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
|  |  | ||||||
| public: | public: | ||||||
|  |     /** | ||||||
|  |      * @brief method which forces the current thread to sleep for usecs microseconds | ||||||
|  |      * @param iSleepTime     time in microseconds | ||||||
|  |      */ | ||||||
|     static void usleep(long iSleepTime) |     static void usleep(long iSleepTime) | ||||||
|     { |     { | ||||||
|         QThread::usleep(iSleepTime); |         QThread::usleep(iSleepTime); | ||||||
|     } |     } | ||||||
|  |     /** | ||||||
|  |      * @brief method which forces the current thread to sleep for usecs seconds | ||||||
|  |      * @param iSleepTime     time in seconds | ||||||
|  |      */ | ||||||
|     static void sleep(long iSleepTime) |     static void sleep(long iSleepTime) | ||||||
|     { |     { | ||||||
|         QThread::sleep(iSleepTime); |         QThread::sleep(iSleepTime); | ||||||
|     } |     } | ||||||
|  |     /** | ||||||
|  |      * @brief method which forces the current thread to sleep for usecs milliseconds | ||||||
|  |      * @param iSleepTime     time in milliseconds | ||||||
|  |      */ | ||||||
|     static void msleep(long iSleepTime) |     static void msleep(long iSleepTime) | ||||||
|     { |     { | ||||||
|         QThread::msleep(iSleepTime); |         QThread::msleep(iSleepTime); | ||||||
|  | |||||||
| @ -38,4 +38,3 @@ endif() | |||||||
|  |  | ||||||
| # install properties | # install properties | ||||||
| install (TARGETS ${SUBPROJECT} DESTINATION lib) | install (TARGETS ${SUBPROJECT} DESTINATION lib) | ||||||
| install (DIRECTORY ${SUBPROJECT_INCLUDE_DIR}/ DESTINATION include/) |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user