Commit graph

2553 commits

Author SHA1 Message Date
derselbst
a01917baa2 Remove enable-debug cmake option 2021-10-17 18:31:43 +02:00
derselbst
bb3bc6da26 Remove enable-pkgconfig cmake option 2021-10-17 18:31:07 +02:00
derselbst
90da8af70f Merge branch 'master' into cmake-modernization 2021-10-17 18:23:09 +02:00
Nikos Chantziaras
de05ef2a1c
Fix static mingw linking issues (#990)
* add missing link to libmman
* more complete list of private dependencies in pkg-config file
2021-10-17 18:12:49 +02:00
Tom M
fa75468595
Add a static MinGW CI build (#992) 2021-10-17 14:43:30 +02:00
Yu Qing
7ef8652326
fix windows related encoding problems (#984) 2021-10-03 12:15:57 +02:00
Nikos Chantziaras
db5db4b845
Add cmake build option for disabling OpenMP (#986)
In my case this is because of issue #985, but there's also the use case of being able to test without OpenMP. For example, to disable it on my system in order to test if the crash had anything to do with OpenMP, I had to manually edit `CMakeLists.txt` each time I wanted to turn it off and on again.
2021-09-28 21:53:08 +02:00
Bill Peterson
6c593180ce
Per-channel ALL_SOUND_OFF when seeking/stopping player (#980)
- Only send all sound off on channels which had notes playing
- Send it as ALL_SOUND_OFF CC to a MIDI router to route it to a different synth channel afterwards
2021-09-28 21:29:26 +02:00
Pedro López-Cabanillas
1ddf4c54cf Debian packaging adapted to GNUInstallDirs 2021-09-15 22:56:05 +02:00
Pedro López-Cabanillas
563592aa3d Adopting GNUInstallDirs
* removed and/or replaced most definitions from DefaultDirs.cmake
* removed LIB_SUFFIX
* fixed DEFAULT_SOUNDFOUNT in Windows
2021-09-15 22:56:05 +02:00
derselbst
926581851e Bump to 2.2.3 2021-09-11 18:26:35 +02:00
derselbst
27d357ed31 Add non framework Mac CI build 2021-09-11 18:17:20 +02:00
derselbst
1d9957f14b Merge branch 'master' into cmake-modernization 2021-09-11 18:10:23 +02:00
Pedro López-Cabanillas
6a0d838f33 Fixed OpenMP detection and building, better PkgConfigHelpers.cmake 2021-09-11 18:09:52 +02:00
Tom M
054685fa67
Merge pull request #973 from pedrolcl/no-global-macros
No global macros
2021-09-07 22:49:54 +02:00
Tom M
6e123d6ef0
Add MacOS 11 CI Build (#975) 2021-09-07 22:10:29 +02:00
Pedro López-Cabanillas
b23dc4e961 fixed compilation of CLI client 2021-09-05 22:37:25 +02:00
Pedro López-Cabanillas
55678a078a new macros in pkgconfighelpers.cmake
* sanitize_target_dirs(target) removes include and link directories that
do not exist from the given immported target
* generate_pkgconfig_spec() builds fluidsynth.pc taking the private
libraries from a given target dependencies
2021-09-05 21:56:52 +02:00
Pedro López-Cabanillas
19b9a12e4f fixed link CLI program 2021-09-05 12:09:54 +02:00
Pedro López-Cabanillas
5a71336bd9 replaced global include_directories and link_directories
* by target_include_directories
* by target_link_libraries, using imported targets when possible
2021-09-05 11:30:25 +02:00
Pedro López-Cabanillas
21aca082a9 less property dance 2021-09-04 20:38:17 +02:00
Pedro López-Cabanillas
66b77bfb6f
cmake modernization, tasks 1 & 2 (#970)
* raised cmake_minimum_required ( VERSION 3.13 )
* removed other CMAKE_VERSION checks
* fixed overlinking of library, cmdline client, and unit tests
2021-09-03 12:21:05 +02:00
derselbst
1e6c5b75e3 Add .cmake build files to .spec file 2021-09-01 21:04:33 +02:00
Pedro López-Cabanillas
ebed81099d Clarifications 2021-09-01 21:03:10 +02:00
Pedro López-Cabanillas
7ca3407d30 fixes and simplifications
* FluidSynthConfigVersion.cmake is created with ${VERSION} instead of
${LIB_VERSION_INFO}
* FluidSynthConfig.cmake.in simplified: it doesn't need to include the
version file.
* Simplified BUILD_INTERFACE generator expression as suggested
2021-09-01 21:00:30 +02:00
Pedro López-Cabanillas
ad4f1b9191 cmake: export targets
The build system creates two exported targets:
- The executable FluidSynth::fluidsynth
- The library FluidSynth::libfluidsynth

A downstream project using CMake can find and link the library target
directly with cmake (without needing pkg-config) this way:

~~~
project(sample LANGUAGES C)
find_package ( FluidSynth )
if (FluidSynth_FOUND)
  add_executable( sample sample.c )
  target_link_libraries ( sample PRIVATE FluidSynth::libfluidsynth )
endif ()
~~~

After installing fluidsynth in a prefix like "$HOME/Fluidsynth3":
cmake -DCNAKE_PREFIX_PATH="$HOME/Fluidsynth3/;..."

Instead installing, the build directory can be used directly, for
instance:

cmake -DFluidSynth_DIR="$HOME/fluidsynth-2.2.2/build/" ...
2021-09-01 21:00:18 +02:00
Tom M
f6fa0290b7
Merge pull request #967 from FluidSynth/revert-943-wip-cmake-export-targets
Reverts most of #943 on master as it accidentally broke compilation with CMake < 3.11, but keep the build files for OBS.
2021-09-01 20:58:02 +02:00
derselbst
a244420666 Add necessary files for CI at OBS 2021-09-01 19:54:08 +02:00
derselbst
e6ce0f4845 Remove fluidsynth.spec.in in favor of contrib/fluidsynth.spec 2021-09-01 19:53:58 +02:00
Tom M
fab1ca1ca9
Revert "cmake: export targets" 2021-08-30 16:07:53 +02:00
Tom M
ec0d6e011e
Merge pull request #943 from pedrolcl/wip-cmake-export-targets
cmake: export targets
2021-08-28 23:50:04 +02:00
derselbst
5e1fbf1866 Add necessary files for CI at OBS 2021-08-28 23:36:10 +02:00
derselbst
fefd22a9d6 Remove fluidsynth.spec.in in favor of contrib/fluidsynth.spec 2021-08-28 23:23:34 +02:00
Tom M
c1e286629f
Fix NULL deref in delete_fluid_ladspa_effect() (#963) 2021-08-23 20:04:44 +02:00
Nihal
2fafca42a1
fix typo (#954) 2021-08-07 13:35:04 +02:00
Pedro López-Cabanillas
f023d7e014 Reverted PRIVATE in target_link_libraries() and clarifications 2021-08-02 11:31:43 +02:00
Pedro López-Cabanillas
64a7787e90 fixes and simplifications
* FluidSynthConfigVersion.cmake is created with ${VERSION} instead of
${LIB_VERSION_INFO}
* FluidSynthConfig.cmake.in simplified: it doesn't need to include the
version file.
* Simplified BUILD_INTERFACE generator expression as suggested
2021-08-02 11:31:43 +02:00
Pedro López-Cabanillas
cf5fbac9af cmake: export targets
The build system creates two exported targets:
- The executable FluidSynth::fluidsynth
- The library FluidSynth::libfluidsynth

A downstream project using CMake can find and link the library target
directly with cmake (without needing pkg-config) this way:

~~~
project(sample LANGUAGES C)
find_package ( FluidSynth )
if (FluidSynth_FOUND)
  add_executable( sample sample.c )
  target_link_libraries ( sample PRIVATE FluidSynth::libfluidsynth )
endif ()
~~~

After installing fluidsynth in a prefix like "$HOME/Fluidsynth3":
cmake -DCNAKE_PREFIX_PATH="$HOME/Fluidsynth3/;..."

Instead installing, the build directory can be used directly, for
instance:

cmake -DFluidSynth_DIR="$HOME/fluidsynth-2.2.2/build/" ...
2021-08-02 11:31:43 +02:00
Tom M
ff6b4db503
Update Linux CI (#953) 2021-07-31 21:32:36 +02:00
Tom M
8e56188316
Define socklen_t in according to a feature test (#949)
Co-authored-by: KO Myung-Hun <komh@chollian.net>
2021-07-28 11:00:27 +02:00
Tom M
ec6d563c39
Fix VERSION_GREATER_EQUAL for CMAKE < v3.7 (#950)
VERSION_GREATER_EQUAL was introduced in CMAKE v3.7.

Co-authored-by: KO Myung-Hun <komh@chollian.net>
2021-07-28 10:49:57 +02:00
Evan Miller
c68a10ca13
Restore support for Mac OS X 10.5 and earlier (#947)
Expands on #803 and closes #946.

Tested on macOS 11.4 as well as 10.4.
2021-07-28 10:20:48 +02:00
derselbst
62b60ae161 Add OBS Workflow
Continuous Integration with OBS for various Linux Distros as described here:
https://openbuildservice.org/2021/05/31/scm-integration/

Secret Github Token is owned by @derselbst
Secret OBS Token is owned by build.opensuse.org/users/derselbst
Fluidsynth Github Repo Webhook currently only set up for PullRequest
events (because it's the only event type supported by OBS, at the moment)
2021-07-27 22:47:08 +02:00
Tom M
1511b5a575
Merge pull request #942 from Ghabry/emscripten
Emscripten: Fix CMake issues
2021-07-19 14:01:05 +02:00
Ghabry
0e3411cba4 Emscripten: --as-needed is not supported 2021-07-19 00:36:31 +02:00
Ghabry
475f902584 Fix emscripten: Append CMAKE_MODULE_PATH instead of overwriting it
Emscripten adds a custom CMAKE_MODULE_PATH in the toolchain file.
Without these modules TestBigEndian fails.
2021-07-19 00:27:34 +02:00
Atsushi Eno
4240d31e51
Implement Android Oboe audio error recovery mode. (#940)
Context: https://github.com/FluidSynth/fluidsynth/discussions/931

There is a new settings "audio.oboe.error-recovery-mode" which has
string value of "Reconnect" (default) or "Stop".

Under `Reconnect` mode, it automatically recreate AudioStream for the
same audio device ID (which is the default = valid device, unless a
specific ID is specified). The behavior is the same as OpenSLES.

In the future Fluidsynth might want to provide consistent error handling
mode for audio device unplugged state, but so far this change makes apps
behave not too weird.
2021-07-15 21:40:07 +02:00
Tom M
fc21d284dc
Fix Fluidsynth.pc doesn't include static libraries (#933) 2021-07-11 17:37:54 +02:00
Tom M
a0ec2c5932
Merge pull request #939 from luzpaz/typos
Fix source comment typos
2021-07-10 17:24:52 +02:00
luz paz
e4c8ef080c Fix source comment typos
Found via `codespell -q 3 -S ChangeLog -L bloc,blocs,capela,parms,readd,seh`
2021-07-10 08:44:35 -04:00