Commit Graph

23 Commits

Author SHA1 Message Date
Jörn Heusipp
bd951f9a47 Make sndfile.h independent of build system variables
Fixes <https://github.com/libsndfile/libsndfile/issues/868>.
2022-09-12 10:39:37 +02:00
evpobr
eff5f0a640 cmake: fix LAME dependency search 2022-04-03 11:41:07 +05:00
evpobr
b7c22419b6 cmake: Improve mpg123 handling
mpg123 has official imported target name.
2021-03-27 11:53:51 +05:00
Arthur Taylor
663a59aa6e mpeg: Add MPEG Encode, Decode and Tests
Use SF_FORMAT_MP3 major and SF_FORMAT_MPEG_LAYER_(I|II|III) subformats.
2021-03-25 10:26:15 -07:00
evpobr
1875f49bbf common: Allow to use C99 bool 2021-03-18 15:10:35 +05:00
evpobr
15bb39b4f4 Fix CMake bug with sndio library dependency
In configure.ac sndio search is restricted to OpenBSD OS, make the same
for CMake.
2020-12-11 15:25:28 +05:00
evpobr
f87a1ffe9c Make SSE2 configurable for CMake builds #666
See ENABLE_SSE2 option explanation in README.md.
2020-12-11 15:12:54 +05:00
evpobr
e7f5137b47 Implement fast SSE2 lrint and lrintf, closes #660
lrint() and lrintf() are ridiculously slow when libsndfile is built
using Visual C++.

On x86 and AMD64 platforms this patch adds SSE2 optimized versions.

It is safe to assume that non-SSE2 processors are no longer available to
avoid unnecessary checks.
2020-12-08 10:42:26 +05:00
evpobr
ddf6d7bf46 Allow CMake ENABLE_STATIC_RUNTIME option for MinGW 2020-10-14 16:04:42 +05:00
evpobr
7ca049d374 CMake: Improve MSVC runtime library flags handling
Change behaviour of `ENABLE_STATIC_RUNTIME` option:

* You can use `ENABLE_STATIC_RUNTIME` for CMake >= 3.15 without error.
* You can use your our method to set MSVC runtime library flags if none of `ENABLE_STATIC_RUNTIME` and `CMAKE_MSVC_RUNTIME_LIBRARY` were set.
2020-10-13 08:47:04 +05:00
evpobr
fe50b95615 CMake: Fix MinGW with Clang compiler warnings 2020-08-31 09:30:42 +05:00
evpobr
f7e5bcb5a2 CMake: Fix ENABLE_STATIC_RUNTIME warning
Warning about unusable ENABLE_STATIC_RUNTIME appeared on non-MSVC
platforms even if this option was not set.

Related to 26e4737,  #546,
2020-08-24 14:33:51 +05:00
evpobr
26e473796c CMake: Deprecate ENABLE_STATIC_RUNTIME for CMake >=3.15
Closes #546.
2020-08-24 12:58:21 +05:00
evpobr
af49a5021c CMake fixes
* Set static runtime by default for MinGW

  Autotools does the same. Also fixes bug - compiler flags for MinGW were
  cleared by when ENABLE_STATIC_RUNTIME is OFF (default).

  Also ENABLE_STATIC_RUNTIME option disabled for MinGW.

* Better CMake policies handling
* Add SndFile::sndfile alias library
* Don not add programs to package config-file
* Update README.md
* Fix generator expression with src/version-metadata.rc
2020-08-04 15:59:22 +05:00
evpobr
06ebde50e3 CMake fixes
* Update Vorbis targets to match upstream
* Better dependency handling with Vcpkg
* Fix dev warning with SQLite3
2020-04-12 16:20:04 +10:00
evpobr
e6909192ce CMake improvements
* Fix Ogg and Opus imported targets
* Better SndFileConfig.cmake module with dependency checks
* Fix config-file package installation directory
* Prefer config-file package mode for Windows CI builds
* Update README.md
* Allow CMAKE_MSVC_RUNTIME_LIBRARY option to set MSVC ABI
* Fix some bugs in FindFLAC.cmake (closes #505)
2020-03-08 17:34:27 +11:00
Arthur Taylor
326e4533f3 Opus file support
Ogg: Introduce new functions ogg_sync_fseek(), ogg_ftell(), ogg_next_page(),
ogg_stream_next_page(), ogg_sync_last_page_before(), and
ogg_stream_unpack_page(). Use ogg_sync_* for ogg_read_first_page(). Bump libogg
version requirement from 1.1.3 to 1.3.0 as LibOgg 1.3.0 is required for
ogg_stream_pageout_fill() and ogg_stream_flush_fill().

Opus: Add opus support. Document added commands
SFC_(GET|SET)_ORIGINAL_SAMPLERATE. Added or extended tests ogg_opus_test,
compression_size_test, floating_point_test, lossy_comp_test, string_test,
external_libs_test. Change Opus to non-experimental.
2019-02-20 19:30:30 +11:00
evpobr
71661c4f19 CMake: Fix warnings on MinGW platform
Fixes warning: `"__USE_MINGW_ANSI_STDIO" redefined`.

`__USE_MINGW_ANSI_STDIO` is required to use 64-bit numbers in
    printf-like functions.
2019-02-01 07:45:29 +11:00
evpobr
6710ff3fc6 CMake: updates & fixes 2018-08-25 12:16:36 +10:00
evpobr
3d8399dfde Fix broken ABI
Unfortunately ABI was broken when symbols files were removed
in favour of new visibility control of exported functions.

Visibility control with -fvisibility works fine, but symbol
scripts had another feature - versioned symbols. And we lost it.

Since we can not make our symbols to be versioned  with the new
approach, it's decided to return everything back.

* CMake: Restore symbol files generation
* CMake: Python is required to build shared libraries
* Autotools: Restore symbol files generation

Closes: https://github.com/erikd/libsndfile/issues/268
2017-05-26 06:16:42 +10:00
evpobr
9ebb96ca72 More CMake polishing
* Add win32_ordinal_test to test suite
* Add examples targets
* Add sndfile-regtest target
* Improve compatibility with MSVC
* Check direct.h header
* Add define to enable math constants
* Don't use CTest if tests are disabled
* Make packaging configurable
* Suppress annoying MSVC warnings
* Add ENABLE_BOW_DOCS option
* Add ENABLE_STATIC_RUNTIME option
* Add package config support
* Tune large files support messages
* Don't build tests when static libs disabled
* Use VS solution folders feature
* Fix option value set twice
* Rename sndfile target to sndfile-shared
* Mark M_LIBRARY variable as advanced
* Fix config packages installation directory
* Rename ENABLE_PACKAGING option for clarity
* CPack fixes
* Add CMake modules to Makefile.am
* Update documentation

Closes: https://github.com/erikd/libsndfile/issues/71
2017-04-25 19:21:40 +10:00
Anonymous Maarten
560cefe607 CMake: Use CMakeAutoGen as CMake AutoGen implementation
* By removing the GNU AutoGen dependency of the cmake,
  libsndfile can be built using only cmake and a compiler toolchain
* Fix non-matching FOR and ENDFOR of template src/test_endswap.tpl
* Add pcm_test to test suite

Related: https://github.com/erikd/libsndfile/issues/71

Closes: https://github.com/erikd/libsndfile/issues/154
2017-04-25 19:21:40 +10:00
Erik de Castro Lopo
1c0ea87cc3 Rework CMake build system
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-04-05 19:38:36 +10:00