Commit Graph

62 Commits

Author SHA1 Message Date
f60cd86ab6 Add option to use system projectm-eval (used in vcpkg) 2024-05-03 15:09:33 -05:00
fa3a15c4cb Use CMakeLists.txt in GLM source dir
Also simplified it a bit, excluding the unnecessary source files and adding the interface library on the top level CMakeLists.txt.
2024-03-19 23:14:09 +01:00
50c0f02b6d Add pthreads option for emscripten 2024-03-19 23:14:04 +01:00
b658cccf05 Release version 4.1 2024-03-02 15:36:02 +01:00
59efc54fe5 Fix emscripten options in CMakeLists.txt 2024-02-25 22:28:22 -06:00
8897b9fe39 Only parse headers with doxygen 2024-02-09 19:15:38 -06:00
82f2b58205 Use exhale to better organize the C++ documentation 2024-02-09 16:37:09 -06:00
79973a1e07 Initial import of sphinx project 2024-02-09 16:37:09 -06:00
0beb7a2d09 Relocated dll's to PROJECTM_BIN_DIR on Windows 2024-02-02 10:21:25 -06:00
27f3308ac3 Remove utterly useless multithreading switch
Since we're using OpenGL, everything has to be done in the same thread anyways. Besides that, the actual "multithreading" implementation was basically starting an empty thread that did absolutely nothing, then wait synchronously for it to complete and join it on the next frame.
2024-02-02 15:08:04 +01:00
184766b2c8 pkgconfig fixes 2024-02-02 15:08:04 +01:00
e018854619 Silence OpenGL deprecation warnings on macOS.
Nothing we can do about that in the short term. We might support Metal (eventually via MetalVK) in a future version.
2024-02-02 15:08:04 +01:00
170f054860 Remove no longer used LLVM support code. 2024-02-02 15:08:04 +01:00
1513675c31 Remove no longer used omptl and OpenMP support.
Fixup: remove omtpl
2024-02-02 15:08:04 +01:00
7e45cbe1f9 Clean up minor warnings and code style
* Remove warnings for code in vendor folders
* Add pedantic and extra warnings in GCC only to projectM sources
* Rename ResetOpenGL to SetWindowSize
2024-02-01 11:27:10 -06:00
3cba474888 Move filesystem support check to top level CMakeLists.txt
Preparing to replace the low-level POSIX API usage in FileScanner.cpp.
2024-01-30 14:43:10 +01:00
9b03314d19 Fix generator expressions showing up in pkgconfig files
Instead of using these expressions, adding "lib" in fron of static libs is now done via CMAKE_STATIC_LIBRARY_PREFIX when building static libs on Windows.
2023-11-26 13:52:10 +01:00
483b32d546 Set library base name once in top-level CMakeLists.txt.
Will avoid making errors in future versions. Include dirs still are hard-coded, as they partially exist as paths in the source tree.
2023-10-06 12:51:22 +02:00
b88f96b780 Fix CMake scripts, so they can be used via add_subdirectory(). 2023-09-19 18:38:43 +02:00
cadcdda6b4 Add output for which GL implementation we build and always use GLES on Android 2023-09-19 18:38:43 +02:00
4b3226ac3a Added projectM-Eval as submodule, flipped rendering stuff around a bit more. 2023-09-11 10:19:48 +02:00
b9ef6a3974 Remove old expression parser and add the new projectm-eval lib.
Requires a general rewrite of the Milkdrop preset code. Previous implementation was tightly integrated into the code parser, so reusing this code wasn't possible. Additional refactoring was done, finished converting custom wave/shape implementations to use the new expression parser code.
2023-09-11 10:19:45 +02:00
b9f1c16f58 Move third-party libraries to "vendor" dir. 2023-03-03 14:30:24 +01:00
a6b4771ad5 Bump libprojectM version to 4.0.0 2023-01-25 19:45:37 +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
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
a88f62360a Add version header and API methods to get build/run time versions of libprojectM. 2023-01-24 20:03:44 +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
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
dd021f450f Enable exception catching for emscripten 2022-12-13 20:21:29 -06:00
7363afecc2 Add path scanning and sorting to the playlist implementation.
Path scanning is using C++17's std::filesystem if available, but uses boost::filesystem as fallback. Using boost can be forced using the ENABLE_BOOST_FILESYSTEM CMake option.
2022-11-21 19:54:57 +01:00
d97feb22f6 Entirely removed native presets.
The native presets did not build anymore due to refactorings, cause other build issues on Windows (e.g. require linking to psapi.lib) and would need a complete makeover anyway.
2022-09-18 13:32:58 +02:00
e4701793ee CMake: set ENABLE_SHARED_LINKING to ON when ENABLE_SHARED_LIB is enabled
This fixes the following CMake error when configuring with just
-DENABLE_STATIC_LIB=OFF:

CMake Error at src/libprojectM/CMakeLists.txt:130 (add_library):
  add_library cannot create ALIAS target "projectM::libprojectM" because
  target "projectM_static" does not already exist.

In this case, static linking is disabled, thus the "projectM_static"
CMake target doesn't exist. Previously, ENABLE_SHARED_LINKING was always
false, and because of that, "projectM::libprojectM" was added as as an
alias to "projectM_static", which didn't exist.

Now, ENABLE_SHARED_LINKING is set to true only when ENABLE_SHARED_LIB is
enabled, otherwise it will be false.
2022-09-15 17:02:05 +02:00
edf06e9940 Disable OpenMP & multi threading on emscripten.
Doesn't give any real speed improvements either due to WebAssembly limitations, so we just drop it for now.
2022-07-11 14:26:57 +02:00
73042a9fca Removed a filename that was added automatically to the wrong target by the IDE.
Had no build implications as it's an interface target.
2022-06-24 15:29:48 +02:00
4ad0242c60 Only search for system GLM library if user requests it.
Preferably (and by default) use the internal copy. There's rarely a need to use it from a system location, as it's just a header-only lib.
2022-06-09 10:49:14 +02:00
90bf1200bd Fix CMake configuration SDL2 version output for the test UI. 2022-05-29 15:49:52 +02:00
eb96d22a63 Use CMake's FindOpenMP module and link to the target if found.
Also export the target for linking the static libprojectM library in downstream projects. This is not required for the shared lib, and in this case, missing OpenMP compiler/linker support will not fail the build.
2022-05-29 15:49:52 +02:00
c0b5b1f189 Increased minimum CMake version to 3.15 2022-05-20 17:51:59 +02:00
1769039b08 Deleted old "unit tests" which did nothing useful.
Note: This change alone will not configure properly as the test target has no code files.
2022-04-14 15:59:06 +02:00
8863a093ef Replaced pthread API with STL's concurrency library.
Multithreading will now also work on Windows while the STL variant is even less verbose, making the code easier to read. Thus enabled threading for all platforms, including emscripten.
2022-04-06 14:32:55 +02:00
2f8b188195 Some CMake build fixes, mostly affecting Windows builds.
- Got rid of the WORD_BITS usage in omptl_tools.h, which is a macro that is only defined on UNIX platforms, but not MSVC.
- Removed export(PACKAGE) call, as it's been disabled/deprecated since CMake 3.15 and puts a half-baked config into the registry. Better install and use CMAKE_PREFIX_PATH.
- Removed set_and_check commands in the package config file, added missing include for the target definition file.
- Added "lib" prefix to the static library file on Windows as it will otherwise have the exact same name (projectM.lib) as the shared library exports file.
- Enable shared library building on Windows by default as on all other platforms.
- On Windows, search for package GLEW as it's required.
2022-02-28 18:04:25 +01:00
9e9f4ca1b2 Removed all outsourced code/files from the repo and updated README.md with new links.
New subproject/data locations:
- presets/presets-cream_of_the_crop: https://github.com/projectM-visualizer/presets-cream-of-the-crop
- presets/presets-En_D: https://github.com/projectM-visualizer/presets-en-d
- presets/textures: https://github.com/projectM-visualizer/presets-milkdrop-texture-pack
- src/EyeTune: https://github.com/projectM-visualizer/frontend-uwp
- src/museum: https://github.com/projectM-visualizer/museum
- src/projectm-android: https://github.com/projectM-visualizer/examples-android
- src/projectM-emscripten: https://github.com/projectM-visualizer/examples-emscripten
- src/projectM-jack: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-libvisual: https://github.com/projectM-visualizer/frontend-libvisual-plug-in
- src/projectM-libvisual-alsa: Deleted.
- src/projectM-moviegen: https://github.com/projectM-visualizer/tools-moviegen
- src/projectM-MusicPlugin: https://github.com/projectM-visualizer/frontend-music-plug-in
- src/projectM-pulseaudio: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-qt: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-sdl: src/sdl-test-ui
- src/projectM-test: tests
2022-02-18 18:01:03 +01:00
a7035d6e74 Implement proper emscripten support in the new CMake build system.
Changes:
- Removed the unneeded and non-standard gl3ext.h include in SOIL2 that's not present in the official GLES3 specs.
- Auto-detect emscripten via CMAKE_SYSTEM_NAME instead of using an option.
- Disable all other feature detection code if emscripten is used.
- Remove old project files and convert the sample entry point app to use the new C-based API and SDL2 only.
- Updated emscripten build instructions in the README.md.
2021-11-15 21:13:19 +01:00
8c30f62bf0 Add GLES3 find script to CMake and enable GLES3 support.
The find script changes will be proposed upstream for patching the built-in CMake module. Until that's merged, we use the local copy if GLES3 is requested.

Enabling GLES3 on desktop Linux should work out-of-the box now provided the required libs and headers are there. For example, Mesa's GLES implementation will work.
2021-11-15 21:11:03 +01:00
1f2d081f99 Completely skip compiling native preset loading code if disabled. 2021-11-05 23:41:12 +01:00
ad313ad5c5 Update CMakeLists.txt 2021-08-23 18:37:57 +02:00