Commit Graph

23 Commits

Author SHA1 Message Date
Md Ashfaq Salehin
b706e62ead Added missing parenthesis
Adding libsndfile in NDK based android app is failing for this typo
2020-11-13 08:36:06 +05:00
evpobr
dc982dad37 Improve CMake SQLite3 find module
Make it compatible with official find module (CMake >= 3.14).
2020-10-27 17:01:46 +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
ec8f843fa1 CMake: Cache clip test result 2020-09-25 17:49:18 +10: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
73e09a1705 CMake: Fix Vorbis dependency handling
* Fix Vorbis not found for CMake < 3.17 (closes #530)
* Update FindVorbis module documentation
* Remove unused VorbisEnc.cmake
* Fix bug in SndFileConfig.cmake.in
2020-08-02 16:13:38 +05:00
Max Smolens
808fb07864 CMake: Fix Package Configuration file when ENABLE_EXTERNAL_LIBS is OFF
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.
2020-06-19 20:58:00 +10: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
54dc330215 CMake: fix importing with add_subdirectory command 2017-04-26 16:02:11 +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
Anonymous Maarten
d7efb3bfc6 CMake: Allow parallel out-of-tree build
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
2017-04-25 19:21:40 +10:00
Erik de Castro Lopo
7c402ad94b Fix 'make distcheck' 2017-04-06 19:29:22 +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