Commit Graph

10 Commits

Author SHA1 Message Date
0789c54404 Remove unnecessary feature detections, move filesystem defines to config.h. 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
b88f96b780 Fix CMake scripts, so they can be used via add_subdirectory(). 2023-09-19 18:38:43 +02:00
69b4c6a8ee Remove obsolete defines from the buildsystem
None of these defines are used anywhere in the code, so they should be
safe to delete.
2023-06-11 18:04:13 +02:00
9e5f86b75f features.cmake: enable exceptions and RTTI on MSVC
On MSVC, this warning is emitted when including <vector>, among others:

  warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

clang-cl won't even build without /EHsc and fails on the first try-statement.

Since projectM uses the C++ standard library and because it uses exceptions
itself, enable the flag.

Also, since projectM uses dynamic_cast, enable RTTI.

While both /EHsc and /GR are added by CMake by default, user-provided
CMAKE_CXX_FLAGS will override the CMake default. So instead of relying on
the CMake default, enable them explicitly.
2022-09-16 10:47:56 +02:00
f40fd3f467 features.cmake: avoid duplicate header check 2022-09-16 10:47:56 +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
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
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