Commit Graph

29 Commits

Author SHA1 Message Date
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
6bdc817b32 Add some new build options and use the C API in projectMSDL app.
Details:
- New options to control building projectM as either static, shared or both libraries.
- The reference UIs can now also be linked to the shared library if it is built.
- Added an option to disable building the SDL frontend. SDL2 is still required for tests and the Emscripten build.
- Initial option for building Doxygen documentation, but the feature is currently not implemented beyond that.
- The SDL frontend no longer derives from the projectM class, but uses the C-based API calls instead.
2021-08-23 18:37:57 +02:00
14f4bcac65 Added a C-style interface header and wrapper for projectM.
This will make it easier to integrate projectM into C applications and also removes potential issues of STL/C++ version differences between host and library.

Changed visibility of all symbols except the C API to "hidden". This effectively prevents the C++ API from being used in the shared library.

Added an option "ENABLE_CXX_INTERFACE" to re-enable the old export behaviour, displaying a prominent author warning after configuring the build if enabled.
2021-08-23 18:37:57 +02:00
a02106d358 Fix CMake options (#526)
* Fix SDL and Qt CMake option dependencies.

- Forcibly enable Qt if either the PulseAudio or JACK frontends were enabled.
- Fix condition for ENABLE_SDL, forcing it only if Emscripten or tests are enabled.
- Also check for SDL being enabled in the SDL app dir and skip it if SDL is disabled.
- Spell PulseAudio correctly.

* Add a failure message for the missing GLES support.

* Fixed another broken GLES check.
2021-08-17 22:00:35 +03:00
679c469e50 Updated Qt UIs and CMake build scripts to support Qt 6.
Changes:
- Added new parameter QT_VERSION to let the user force a specific Qt version to be searched.
- Auto-detect Qt version if not forced, preferring Qt 6.
- Updated the projectM render widget to use QOpenGLWidget instead of the deprecated QGLWidget.
- Changed some calls and types to be compatible between Qt 5 and 6, e.g. QXmlStreamReader.
- Some small fixes pointed out by assertions in the debug Qt 6 version.
2021-08-11 11:57:12 +02:00
b3c28c42ef Llvm 10 (#470)
* Compiles with llvm 10
* assume/require LLVM_VERSION_MAJOR >= 10
* MAKE_CXX_STANDARD 14
2021-06-18 12:56:08 -07:00
521eff97a5 Add GitHub Action to build with CMake on Windows, Linux and macOS. 2021-06-10 18:05:20 +02:00
83a08f3a6c Add CMake build system files (only as "autotools" replacement for now) (#487)
* Initial set of CMake files with options and some targets.

* Added all targets to build libprojectM shared/static libraries.

* Updated currently unused (and seemingly unfinished) SDL-based JACK visualizer to use SDL2.

* Converted more targets to CMake and added install directives.

New targets:
- Presets
- Test application
- Pulseaudio/Qt visualizer
- JACK/Qt visualizer
- JACK/SDL2 visualizer

* Added libvisual plug-in target. Changed default install paths to relative.

* Use debug suffix for libraries by default, but make it configurable.

* Added target for projectMSDL application.

* Added CMake code for the ENABLE_THREADING switch, install desktop, icon, manpage and pkgconfig files.

Also added some dependency version output to the post-configuration summary and made Qt switch implicit based on Pulsaudio/JACK UI selection.

* Added CMake package config files and exported targets. Some restructuring of libprojectM targets.

Kept pkgconfig module name for CMake.

* Add -name parameter to RCC command in existing autotools Makefile.

Fixes symbol name mismatch with CMake auto-generated resources which always add the QRC file basename as resource name.

* Display an author warning that CMake files aren't production ready yet.

* Prefer system GLM library, with fallback to bundled version if not available.

Removed the option to use the system library in favor of automated detection.

* Link correct OpenGL libraries, the previous ones were Linux-specific, with GLVND not being required.

* Recreate config.h as generated by autoheader, even if most defines weren't used.

Will also force-include the file on all platforms.

* Add option to build native preset libraries, disabled by default.

* Only install "tests" presets if building the test suite.

* Fix linking LLVM libraries to libprojectM.

Wasn't inherited anymore due to changing MilkdropPresetFactory library type to OBJECT.

* Use INTERFACE IMPORTED libraries in find scripts, set minimum CMake version to 3.19.

* Added missing config.h template and renamed to config.h.cmake.in, was in the .gitignore list.

* Added Windows-specific CMake configuration and some related code changes.

These changes enable building for Windows with both Visual Studio and Ninja project generators. Installation and packaging for Windows is not yet supported. Source groups, filters and support for embedded debug symbols will be added later.

* Link required CoreFoundation framework on MacOS.

* Work around SDL2 include dir issue (upstream SDL bug #4004) by removing "/SDL2" from the path.

* Fix existing Windows build by moving bundled GLEW files into "GL" subdir.

* Place libprojectM-related targets in a "libprojectM" folder in IDEs supporting it, e.g. Visual Studio.

* Fix displaying whether system GLM is used or not in config summary.

* Disable threading support on Windows unless we don't rely solely on pthreads anymore.

* Add version check for SDL2 (>=2.0.5).

* Complete overhaul of build instructions, adding CMake build and use instructions.

* Added check for OpenMP support and fixed a compiler error in OMPTL.

Also moved compiler warning checks to features.cmake and added the DEBUG define for debug builds.

* Added a quick start guide for building on Debian and Ubuntu.

* Lower minimum required CMake version to 3.14.

Co-authored-by: Kai Blaschke <kai.blaschke@gdata.de>
2021-06-04 16:48:20 +03:00
17029ce961 removing cruft, updating readme 2017-09-18 15:29:38 -07:00
135f298579 fix GL and dirent header inclusion on emscripten, define it 2014-06-19 00:47:57 -07:00
b2c0fcd7bb Add possibility to use system fonts & fix font-loading bug in renderer
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1396 6778bc44-b910-0410-a7a0-be141de4315d
2012-04-14 14:26:11 +00:00
36a13b163f Fix projectM build process
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1368 6778bc44-b910-0410-a7a0-be141de4315d
2012-01-01 19:04:00 +00:00
20be06f73d cpack fixes, publishing updateS
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1322 6778bc44-b910-0410-a7a0-be141de4315d
2009-12-06 01:14:21 +00:00