Commit Graph

2519 Commits

Author SHA1 Message Date
94fee67baf Fix unused variable warning in release mode
The assert() is removed in release mode causing unused variable
warning noise.
2023-02-27 23:57:06 +01:00
2d370d3235 CMake: Fix pkg-config entry "Requires:" for projectM-4-playlist-debug.pc 2023-02-22 16:34:46 +01:00
51ee60e045 Rename include directory "libprojectM" to "projectM-4" 2023-02-22 16:34:46 +01:00
221b3cb4b7 Rename .cmake.in files from "libprojectM" to "projectM4" 2023-02-22 16:34:46 +01:00
3f66e184ae CMake: Replace "libprojectM(Playlist)Targets" by "projectM4(Playlist)Targets"
$ git grep -l Targets.cmake | xargs sed 's,libprojectM\(Playlist\)\?Targets\.cmake,projectM4\1Targets.cmake,' -i
2023-02-22 16:34:46 +01:00
37eb503748 CMake: Replace "libprojectM(Playlist)Config" by "projectM4(Playlist)Config"
$ git grep -l configure_package_config_file | xargs sed 's,libprojectM\(Playlist\)\?Config,projectM4\1Config,' -i
2023-02-22 16:34:46 +01:00
35c5246936 CMake: Replace "libprojectM" by "projectM4" in .cmake.in files
$ sed 's,libprojectM,projectM4,' ./src/*/libprojectM*Config.cmake.in -i
2023-02-22 16:34:46 +01:00
ee65fa55fd CMake: Replace "cmake/libprojectM" by "cmake/libprojectM4"
$ git grep -l cmake/libprojectM | xargs sed 's,cmake/libprojectM,cmake/projectM4,' -i
2023-02-22 16:34:46 +01:00
0940ec9532 Replace "-4.0" by "-4" 2023-02-22 16:34:46 +01:00
02c11bc1d7 CMake: Replace "api/libprojectM" by "api/projectM-4.0"
git grep -l 'api/libprojectM' | xargs sed 's,api/libprojectM,api/projectM-4.0,' -i
2023-02-22 16:34:46 +01:00
ede45f2e8c CMake: Replace "api/libprojectM/" by "api/projectM-4.0/" 2023-02-22 16:34:46 +01:00
b46f9002b7 CMake: Replace "include/libprojectM" by "include/projectM-4.0"
$ git grep -l 'include/libprojectM' | xargs sed 's,include/libprojectM,include/projectM-4.0,' -i
2023-02-22 16:34:46 +01:00
139bd350fb Replace "#include <libprojectM/" by "#include <projectM-4.0/"
$ git grep -l 'include <libprojectM/' | xargs sed 's,include <libprojectM/,include <projectM-4.0/,' -i
2023-02-22 16:34:46 +01:00
0c04a08941 Replace '#include "libprojectM/[..]"' by '#include "projectM-4.0/[..]"'
$ git grep -l 'include "libprojectM/' | xargs sed 's,include "libprojectM/,include "projectM-4.0/,' -i

And then revert for src/libprojectM/*.hpp includes:

$ for i in $( cd src/libprojectM && ls -1 *.hpp ) ; do grep -Rl "#include \"projectM-4.0/${i}\"" | xargs -r sed "s,\"projectM-4.0/${i},\"libprojectM/${i}," -i ; done
2023-02-22 16:34:46 +01:00
4502f03fd1 CMake: Replace "${PROJECTM_INCLUDE_DIR}/libprojectM" by "${PROJECTM_INCLUDE_DIR}/projectM-4.0" 2023-02-22 16:34:46 +01:00
c9b946be86 CMake: Set OUTPUT NAME to affect .so filenames
Old:
- libprojectM.so
- libprojectM_playlist.so

New:
- libprojectM-4.0.so
- libprojectM-4.0-playlist.so
2023-02-22 16:34:46 +01:00
0ef8e83cd9 CMake: Add "-4.0" and drop "lib" from pkg-config names 2023-02-22 16:34:46 +01:00
a6b4771ad5 Bump libprojectM version to 4.0.0 v4.0.0-rc1 2023-01-25 19:45:37 +01:00
1d55ade17b Update CMake build instructions to match current state of development. 2023-01-25 19:45:08 +01:00
46378e5e43 Clean up some unused CMake options and reorder options. 2023-01-25 19:44:24 +01:00
433ca9f9b5 Bump minimum CMake version to 3.20. 2023-01-25 18:44:15 +01:00
aaeea0b083 Renamed m_textureSizeX/Y to m_mainTextureSizeX/Y in class Renderer. 2023-01-25 18:11:49 +01:00
15cd0612e0 Removed unused textureRenderToTexture member in Renderer. 2023-01-25 18:11:22 +01:00
46e720a7a7 Removed unused projectm_opengl_init_render_to_texture() API function. 2023-01-25 18:10:26 +01:00
e6b493a270 Removed unused projectm_set_texture_size() API function. 2023-01-25 18:09:02 +01:00
13437a5d91 Preset parser: Removed a few commented debug lines and one that wasn't wrapped in the PARSE_DEBUG define. 2023-01-25 15:42:47 +01:00
a4bcee241a Preset parser: Throw exception instead of calling SIGABRT if expression can't be parsed. 2023-01-25 15:42:47 +01:00
bd6d9805fc Preset parser: Return 0.0 constant on empty rvalue if line is terminated properly.
Crashed on presets with expression lines like "val = ;".
2023-01-25 15:42:47 +01:00
8e594bc8e9 Fix index-out-of-bounds crash when getting shader param substring. 2023-01-25 15:42:46 +01:00
ed5f2d91c5 Use GNU install dirs CMake module to retrieve default install dirs.
Won't change anything in regard to the previous defaults, but allows users to use CMake's default way of passing these dirs, as requested in GitHub issue #527
2023-01-25 15:41:41 +01:00
2b41fa256a Let developers provide an optional filename for dumping main texture contents. 2023-01-25 14:22:19 +01:00
45d05b71d0 Fix hard crash if OpenGL wasn't properly initialized on projectM instance creation.
Now projectm_create() will just return a NULL pointer instead of having the runtime library call SIGABRT.

In a later iteration, we may allow creation of the instance and just keep the renderer uninitialized. Users should then call a to-be-introduced renderer reinitialization function.
2023-01-24 20:21:41 +01:00
a88f62360a Add version header and API methods to get build/run time versions of libprojectM. 2023-01-24 20:03:44 +01:00
a85f9c61ef Add OpenMP libraries and flags to libprojectM pkg-config file. 2023-01-24 19:19:53 +01:00
ebafd69dfb Create proper pkg-config file for libprojectM_playlist.
Generalized the generator code as a macro. Still a huge mess.
2023-01-24 19:13:07 +01:00
2287172cbb Create proper pkg-config file for libprojectM.
Should now support both static and shared libs, plus adding any other required flags.
2023-01-24 18:49:37 +01:00
bcaf98f2f1 Rename USE_THREADS to PROJECTM_USE_THREADS and export it in the package config file.
PROJECTM_USE_THREADS is only exported if ENABLE_CXX_INTERFACE is ON.
2023-01-24 17:56:12 +01:00
97519a81e6 Set default symbol visibility to hidden.
Only export API symbols, keep everything else hidden. C++ API will only expose the ProjectM and PCM classes, but no internals.

If devs want to have full access to projectM's internals, they need to adapt the build process to their own needs.
2023-01-24 17:49:55 +01:00
bff9e52c69 Reduce header footprint of optional C++ API files and export C++ symbols properly. 2023-01-24 17:47:39 +01:00
1f33c810b3 Split up API headers into smaller, categorized files.
Also updated copyright and prefixed the render-related function with "opengl".
2023-01-18 12:57:57 +01:00
05a2f2a41a GitHub Actions: Add static library build jobs for desktop platforms. 2023-01-17 20:00:44 +01:00
c6be80a491 GitHub Actions: Update local package lists before installing dependencies. 2023-01-17 18:58:03 +01:00
bac2a7ae12 Fix playlist tests on Windows.
Removed dependency on projectMtarget alltogether, as the playlist tests don't need the core library at all, only a few API functions which are mocked. Also made sure the mocked functions are declared as dllexport on Windows to match the dllimport declspec in the playlist library.
2023-01-17 18:55:29 +01:00
edbe7455da macOS: Link CoreFoundation framework to the projectM library. 2023-01-17 18:55:23 +01:00
6e795ec632 Only build either shared or static projectM and playlist libraries.
Target name is now just libprojectM::projectM for the main library instead of libprojectM::static or libprojectM::shared.

Now using CMake's default mechanism to select the resulting library type via the BUILD_SHARED_LIBS variable. Main use case will be working with the shared library, which is the default.

Playlist library now also builds as a shared library, including proper symbol exports.

Additionally, deleted the leftover TestRunner class and a few old and rather useless test cases.

Also added LLVM find_package call and as a link dependency if the build is configured for using (experimental) LLVM code.

Reorganized tests to link either one of the object libraries for unit testing.
2023-01-13 11:16:27 +01:00
f2615a1745 Change projectm_playlist_items() method to return a given range of items. 2023-01-07 18:37:23 +01:00
4d54a511d1 Add projectm_playlist_get_shuffle() method to playlist API 2023-01-07 18:37:22 +01:00
c8077a2145 Partially fix smooth blending.
There's still a sudden change between presets halfway through the transitions as the shaders are swapped, but fixing this would require a larger rewrite of how presets are rendered in the pipeline. Will do this later.
2023-01-07 15:52:51 +01:00
eb95939419 Clamp preset progress between 0.0 and 1.0 2023-01-07 15:52:51 +01:00
3dcb1f7a56 Fix preset change notification. 2023-01-07 15:52:51 +01:00