You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`ENABLE_SDL_UI`|`ON`|`SDL2`| Builds the SDL-based test application. Only used for development testing, will not be installed. |
118
+
|`ENABLE_GLES`|`OFF`|`GLES`| Use OpenGL ES 3 profile for rendering instead of the Core profile. |
119
+
|`ENABLE_THREADING`|`ON`|| Enable multithreading support for preset loading if available. |
120
+
|`ENABLE_OPENMP`|`ON`|`OpenMP`| Enable OpenMP support if available. |
121
+
|`ENABLE_DEBUG_POSTFIX`|`ON`|| Adds `d` (by default) to the name of any binary file in debug builds. |
122
+
|`ENABLE_SYSTEM_GLM`|`OFF`|| Builds against a system-installed GLM library. |
123
+
|`ENABLE_LLVM`|`OFF`|`LLVM`| Enables **highly experimental** LLVM JIT support. Will most probably not build, as the LLVM API changes frequently. |
124
+
|`ENABLE_CXX_INTERFACE`|`OFF`|| Exports symbols for the `ProjectM` and `PCM` C++ classes and installs the additional the headers. Using the C++ interface is not recommended and unsupported. |
100
125
101
126
### Path options
102
127
@@ -105,15 +130,23 @@ the following options are appended to the value
105
130
of [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) (which, on most UNIX
|`CMAKE_DEBUG_POSTFIX`|`d` (if `ENABLE_DEBUG_POSTFIX` is set) | Postfix appended to debug libraries. |
147
+
|`CMAKE_INSTALL_BINDIR`|`bin`| Another way to specify the binary installation directory. Used as default value for `PROJECTM_BIN_DIR`. |
148
+
|`CMAKE_INSTALL_LIBDIR`|`lib` or `lib64`| Another way to specify the library installation directory. Used as default value for `PROJECTM_LIB_DIR`. |
149
+
|`CMAKE_INSTALL_INCLUDEDIR`|`include`| Another way to specify the include file installation directory. Used as default value for `PROJECTM_INCLUDE_DIR`. |
117
150
118
151
## Always perform out-of-tree builds!
119
152
@@ -168,8 +201,8 @@ several reasons:
168
201
deleting the build directory).
169
202
3. For some configurations, even Release build artifacts may contain debug symbols until they are installed.
170
203
171
-
It is fine to build and run executables from the build directory for development and debugging. For packaging, always
172
-
use the `install` target and copy files from there.
204
+
It is fine to build and run executables from the build directory for development and debugging. For packaging or using
205
+
libprojectM in other projects, always use the `install` target and copy files from there.
173
206
174
207
### Generated files
175
208
@@ -185,13 +218,8 @@ In the top-level build directory, CMake creates a few files that are present on
185
218
- The top-level project file for use with the selected build toolset, e.g. `Makefile`, `build.ninja`, `projectm.sln`
186
219
or `projectm.xcodeproj`, plus additional toolset-specific files.
187
220
188
-
The projectM build files generate additional files used in the build and install phases:
189
-
190
-
-`config.inp`: The default configuration file, by default installed to `<prefix>/share/projectM`.
191
-
-`libprojectM.pc`: Package configuration file for use with `pkgconfig`.
192
-
-`include/config.h`: A forced include file that contains macro definitions to enable or disable certain code features
193
-
based on the build configuration and availability of platform headers and features. Similar to the
194
-
autoheader-generated file.
221
+
The projectM build files generate additional files used in the build and install phases. These are scattered over the
222
+
build tree, but installed into the proper directories. Do not try and gather these files yourself from the build tree.
195
223
196
224
### Subdirectory structure
197
225
@@ -200,6 +228,8 @@ a `CMakeLists.txt` file will also be created in the build tree with the same rel
200
228
contains a `CMakeFiles` directory with CMake-internal data, generated project files for the select toolset, e.g.
201
229
makefiles and any temporary compile artifacts.
202
230
231
+
The directory structure is created by CMake and may change depending on the generator and CMake version used.
232
+
203
233
### Executable and library locations
204
234
205
235
Build targets - shared/static libraries and executables - are created in the same subdirectory in the build tree as
@@ -213,84 +243,71 @@ on Windows.
213
243
214
244
## Using libprojectM in other CMake projects
215
245
216
-
The projectM library can be used as a static library and, on non-Windows platforms, as a shared library in other
217
-
CMake-based projects to provide embedded audio visualization. There are two ways:
246
+
The projectM library can be used as a static library or shared library in other CMake-based projects to provide embedded
247
+
audio visualization. It is highly recommended to build projectM as shared libraries for maximum compatibility and LGPL
248
+
compliance.
218
249
219
-
- Importing the library CMake targets directly from the build tree without installation.
220
-
- Using the library from an installed location or package with the provided CMake package config files.
250
+
The build directory is not structured in a way that other projects can make use of it. Use the `install` target to copy
251
+
all required files to the configured installation prefix. You can customize the subdirectories for libraries, includes
252
+
and binaries using the `PROJECTM_<X>>_DIR` variables when configuring the CMake project.
221
253
222
254
### Importing libprojectM targets from the build tree
223
255
224
-
This approach is useful for projects that either require more in-depth access to the projectM library files, especially
225
-
to headers that are not installed as part of the public API. This might cause issues if the internal headers change, but
226
-
gives a broader set of features and more control to the developer.
227
-
228
-
To use the targets, follow these steps:
256
+
This approach is not recommended, but can be useful for projects that either require more in-depth access to the
257
+
projectM library files, especially to headers that are not installed as part of the public API. This might cause issues
258
+
if the internal headers change, but gives a broader set of features and more control to the developer.
229
259
230
-
- Configure the build directory as needed.
231
-
- Build the required library targets `projectM_static` and `projectM_shared` as needed, or simply everything.
232
-
- Include the file `src/libprojectM/projectM-exports.cmake` from the projectM build tree in your project.
233
-
234
-
All targets and their interface properties are now defined and can be used.
0 commit comments