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.
* 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
When libsndfile is configured with ENABLE_EXTERNAL_LIBS=OFF, the CMake
Package Configuration file shouldn't look for the external libraries.
Otherwise, the return() call in the find_dependency() macro causes
find_package(SndFile) to fail if the libraries are not found.
Furthermore, the find_dependency() calls are necessary only when
BUILD_SHARED_LIBS=OFF. In other scenarios, the external libraries aren't
linked by client projects.
* 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)
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.
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
This allows parallel builds of different LibSndFile configurations
- results of configure_file and AutoGen are saved in CMAKE_BINARY_DIR
- the directory ${CMAKE_BINARY_DIR}/src is make a public include directory
- remove generated files in source tree prior to generation + fix install
Related: https://github.com/erikd/libsndfile/issues/71