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.
This commit is contained in:
Kai Blaschke
2021-08-17 00:06:02 +02:00
parent a9be845e2d
commit 14f4bcac65
10 changed files with 1564 additions and 9 deletions

View File

@ -157,7 +157,7 @@ const std::vector<std::string> &PresetLoader::getPresetNames() const
}
// Get the preset index given a name
const unsigned int PresetLoader::getPresetIndex(std::string &name) const
unsigned int PresetLoader::getPresetIndex(const std::string& name) const
{
return find(_presetNames.begin(), _presetNames.end(), name) - _presetNames.begin();
}