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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
* 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.
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.
* 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>