|
| 1 | +This file contains the CMake files description |
| 2 | +(useful for developers) |
| 3 | + |
| 4 | +./CMakeLists.txt - root file (the main script): |
| 5 | + contains a list of general options; |
| 6 | + determines the program type Psi/Psi+; |
| 7 | + determines chatlog type Basic/Webkit/Webengine; |
| 8 | + contains general compile definitions; |
| 9 | + enables ccache, mxe; |
| 10 | + contains useful copy function; |
| 11 | + adds iris, 3rdparty, src, plugins subdirectories; |
| 12 | + in case of only plugins build - enables plugins; |
| 13 | + if plugins/generic/psimedia directory exists and BUILD_PSIMEDIA flag is |
| 14 | + enabled - builds psimedia library. |
| 15 | + |
| 16 | +./icondef.xml.in - template-file to generate icondef.xml file |
| 17 | +./iconsets.qrc.in - template-file to generate iconsets.qrc file |
| 18 | + |
| 19 | +./3rdparty/CMakeLists.txt - builds qhttp static library |
| 20 | +./3rdparty/qite/libqite/libqite.cmake - contains qite project file list |
| 21 | + |
| 22 | +./cmake/modules - directory contains modules for searching libraries, for determining a |
| 23 | + program version, for work with sources and generation of additional targets and files. |
| 24 | +./cmake/modules/COPYING-CMAKE-SCRIPTS - license file (to solve problems with mainaining) |
| 25 | +./cmake/modules/FindLibGpgError.cmake - finds libgpg-error library |
| 26 | +./cmake/modules/FindQJDns.cmake - finds qjdns library |
| 27 | +./cmake/modules/FindEnchant.cmake - finds enchant library |
| 28 | +./cmake/modules/FindLibOtr.cmake - finds otr library |
| 29 | +./cmake/modules/FindQJSON.cmake - finds qjson library (disabled as outdated) |
| 30 | +./cmake/modules/FindHunspell.cmake - finds hunspell library |
| 31 | +./cmake/modules/FindLibTidy.cmake - finds tidy or html-tidy library |
| 32 | +./cmake/modules/FindSparkle.cmake - finds sparkle (not yet tested) |
| 33 | +./cmake/modules/FindMINIZIP.cmake - finds minizip library |
| 34 | +./cmake/modules/FindXCB.cmake - finds xcb library |
| 35 | +./cmake/modules/FindLibGcrypt.cmake - finds libgctypt or libgcrypt2 library |
| 36 | +./cmake/modules/FindQca.cmake - finds qca-qt5 library |
| 37 | +./cmake/modules/FindZLIB.cmake - finds zlib library |
| 38 | +./cmake/modules/FindPsiPluginsApi.cmake - module to search files useful at build plugins |
| 39 | +./cmake/modules/get-version.cmake - determines clien version using git utility or by parsing |
| 40 | + a ../version file |
| 41 | +./cmake/modules/win32-prepare-deps.cmake - generates a list of files to install |
| 42 | + with make prepare-bin-libs command, which install dependency libraries |
| 43 | + into output build directory. Or using windeployqt utility if available |
| 44 | + with make windeploy command |
| 45 | +./cmake/modules/generate_desktopfile.cmake - generates .desktop file |
| 46 | +./cmake/modules/fix-codestyle.cmake - module for codestyle fix using clang-format |
| 47 | + |
| 48 | +./iris/CMakeLists.txt - builds iris library: |
| 49 | + contains options for the iris library (duplicated in a main script) |
| 50 | + enables qjdns (if option enabled) |
| 51 | + adds src/irisnet and src/xmpp subdirectories |
| 52 | + |
| 53 | +/*** |
| 54 | +./iris - this directory contains an additional files to build iris library outside of the Psi |
| 55 | + project. This functionality is partially realized. Needs reworking. |
| 56 | +***/ |
| 57 | + |
| 58 | +./iris/cmake/modules - modules for libraries searching (copies of Psi modules) |
| 59 | + |
| 60 | +./iris/src/irisnet/CMakeLists.txt - builds irisnet static library |
| 61 | + |
| 62 | +./iris/src/xmpp/CMakeLists.txt - builds iris static library |
| 63 | + |
| 64 | +./src/CMakeLists.txt - builds and installs the Psi/Psi+ project files: |
| 65 | + adds ../translations directory (if exists) and compiles translations files |
| 66 | + finds an additional libraries and static libraries and adds them to project |
| 67 | + sets the main program name based on the main script data |
| 68 | + generates config.h file based on the config.h.in template file |
| 69 | + generates psi_win.rc based on the ../win32/psi_win.rc.in template file and |
| 70 | + compiles psi_win.o file |
| 71 | + adds src.cmake file |
| 72 | + adds ../3rdparty/qite/libqite/libqite.cmake file |
| 73 | + adds irisprotocol/irisprotocol.cmake file |
| 74 | + adds protocol/protocol.cmake file |
| 75 | + adds ../plugins/plugins.cmake file |
| 76 | + adds AutoUpdater, options, tabs, privacy, Certificates, avcall, psimedia, |
| 77 | + contactmanager, tools, libpsi/dialogs, libpsi/tools, widgets, sxe, |
| 78 | + whiteboarding subdirectories |
| 79 | + substitutes the output program name with an extended name (if enabled) |
| 80 | + generates description files for default iconsets |
| 81 | + if name is extended generates the .desktop file using generate_desktopfile.cmake module |
| 82 | + creates an installation rules |
| 83 | + if DEV_MODE option is enabled generates an installation rules for dependency |
| 84 | + libraries to install into binary output directory using win32-prepare-deps.cmake |
| 85 | + module |
| 86 | + |
| 87 | +./src/config.h.in - template-file for config.h file creation |
| 88 | + |
| 89 | +./src/src.cmake: |
| 90 | + contains the default compile definitions; |
| 91 | + contains a lists with the main source files: |
| 92 | + FORMS list - contains ui files; |
| 93 | + HEADERS list - contains C/C++ header files |
| 94 | + SOURCES list - contains C/C++ source files |
| 95 | + |
| 96 | +./src/AutoUpdater/CMakeLists.txt - builds AutoUpdater static library |
| 97 | + |
| 98 | +./src/avcall/CMakeLists.txt - builds avcall static library |
| 99 | + |
| 100 | +./src/Certificates/CMakeLists.txt - builds Certificates static library |
| 101 | + |
| 102 | +./src/contactmanager/CMakeLists.txt - builds contactmanager static library |
| 103 | + |
| 104 | +./src/irisprotocol/irisprotocol.cmake - a list of source files which will be added into |
| 105 | + the main sources list |
| 106 | + |
| 107 | +./src/libpsi/dialogs/CMakeLists.txt - builds libpsi_dialogs static library |
| 108 | + |
| 109 | +./src/libpsi/tools/CMakeLists.txt - builds libpsi_tools static library: |
| 110 | + adds zip subdirectory |
| 111 | + |
| 112 | +./src/libpsi/tools/zip/CMakeLists.txt - builds zip static library |
| 113 | + |
| 114 | +./src/options/CMakeLists.txt - builds options static library |
| 115 | + |
| 116 | +./src/privacy/CMakeLists.txt - builds privacy static library |
| 117 | + |
| 118 | +./src/protocol/protocol.cmake - a list of source files which will be added into |
| 119 | + the main sources list |
| 120 | + |
| 121 | +./src/psimedia/CMakeLists.txt - build psimedia static library |
| 122 | + |
| 123 | +./src/sxe/CMakeLists.txt - builds sxe static library |
| 124 | + |
| 125 | +./src/tabs/CMakeLists.txt - build tabs static library |
| 126 | + |
| 127 | +./src/tools/CMakeLists.txt - builds tools static library |
| 128 | + |
| 129 | +./src/whiteboarding/CMakeLists.txt - builds whiteboarding static library |
| 130 | + |
| 131 | +./src/widgets/CMakeLists.txt - builds widgets static library |
| 132 | + |
| 133 | +./plugins/plugins.cmake - a list of header files which will be added into |
| 134 | + the main headers list |
| 135 | + |
| 136 | +./plugins/variables.cmake.in - template-file, contains the main variables useful |
| 137 | + to build plugins, general for all plugins |
| 138 | + |
| 139 | +./plugins/pluginsconf.pri.cmake.in - template-file to generate pluginsconf.pri file |
| 140 | + |
| 141 | +./plugins/CMakeLists.txt - main script to rule the plugins |
| 142 | + contains the main build rules for all plugins |
| 143 | + adds generic, unix, dev subdirectories |
| 144 | + |
| 145 | +./plugins/generic/CMakeLists.txt: |
| 146 | + adds subrirectory for each plugin, if BUILD_PLUGINS variable is set it adds only |
| 147 | + plugins from BUILD_PLUGINS list (or exclude plugins) |
| 148 | + |
| 149 | +./plugins/dev/CMakeLists.txt: |
| 150 | + adds subrirectory for each plugin, if BUILD_PLUGINS variable is set it adds only |
| 151 | + plugins from BUILD_PLUGINS list (or exclude plugins) |
| 152 | + |
| 153 | +./plugins/unix/CMakeLists.txt: |
| 154 | + adds subrirectory for each plugin, if BUILD_PLUGINS variable is set it adds only |
| 155 | + plugins from BUILD_PLUGINS list (or exclude plugins) |
| 156 | + |
| 157 | +./plugins/*TYPE*/*PLUGIN*/CMakeLists.txt - builds and installs a plugin |
| 158 | + whit "*TYPE*" type and "*PLUGIN*" name. The structure of these files are mostly |
| 159 | + the same |
| 160 | + |
| 161 | +./win32/win32_definitions.cmake - provides the next features: |
| 162 | + determines PSI_SDK and GSTREAMER_SDK pathes |
| 163 | + determines the MinGW or MSVC compilation flags |
| 164 | + contains the main definitions for OS Windows |
| 165 | + |
| 166 | +./win32/psi_win.rc.in - template-file to generate psi_win.rc file |
| 167 | + |
| 168 | +/*** |
| 169 | +USEFUL TIPS |
| 170 | +***/ |
| 171 | + |
| 172 | +/*** |
| 173 | +For a comfortable plugins packages creation and to aviod downloading all the Psi |
| 174 | +sources or copying of these sources if INSTALL_PLUGINS_SDK flag is enabled |
| 175 | +while installing Psi using CMake-scripts could be installed an additional files |
| 176 | +together with the main program files such as: |
| 177 | +Plugins API (includes, *.pri files, variables.cmake) |
| 178 | +(path $prefix/share/name_of_program/plugins) |
| 179 | +And also could be installed Plugins API search module |
| 180 | +FindPsiPluginsApi.cmake |
| 181 | +(path $prefix/share/cmake/Modules) |
| 182 | +In this case the variables.cmake generates at Psi build and contains: |
| 183 | + - path to the plugins install directory |
| 184 | + - path to the psi/psi+ data directory |
| 185 | + - name of a program (psi or psi-plus) |
| 186 | + - plugins defenitions |
| 187 | + Also the CMake-script generates *.pri files, needed to build plugins using qmake utility |
| 188 | +***/ |
| 189 | + |
| 190 | +/*** |
| 191 | +If there is a plguin debug necessity in OS Linux you can do next: |
| 192 | +- download psi-plus-snapshots repository |
| 193 | +- open CMakeLists.txt from root directory using qtcreator |
| 194 | +- choose profile and build type |
| 195 | +- enable both ENABLE_PLUGINS and DEV_MODE flags |
| 196 | +- clean CMake cache if needed and run CMake (using qtcreator build menu) |
| 197 | +- build project |
| 198 | +That's all. You can debug plugin with the psi/psi+ program. |
| 199 | +***/ |
0 commit comments