Lines Matching +full:windows +full:- +full:build +full:- +full:rules
11 Erik de Castro Lopo <erikd@mega-nerd.com> aka @erikd. The project was developed
29 There are currently two build systems: the traditional GNU autotool based one and
30 modern CMake based build system. Use of the CMake build system is documented
33 Setting up a build environment for libsndfile on Debian or Ubuntu is as simple as:
35 sudo apt install autoconf autogen automake build-essential libasound2-dev \
36 libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
37 libmpg123-dev pkg-config python
44 brew install autoconf autogen automake flac libogg libtool libvorbis opus mpg123 pkg-config
46 Once the build environment has been set up, building and testing libsndfile is
49 autoreconf -vif
50 ./configure --enable-werror
54 ## The CMake build system
56 Although Autotools is the primary and recommended build toolchain, CMake meta
57 build generator is also available. The build process with CMake takes
58 place in two stages. First, standard build files are created from configuration
59 scripts. Then the platform's native build tools are used for the actual
61 Unix Makefiles, Xcode projects and [many more](https://cmake.org/cmake/help/latest/manual/cmake-gen…
68 1. C99-compliant compiler toolchain (tested with GCC, Clang and Visual
75 2. ALSA development package under Linux to build sndfile-play utility
76 3. Sndio development package under BSD to build sndfile-play utility
80 CMake can handle out-of-place builds, enabling several builds from
81 the same source tree, and cross-compilation. The ability to build a directory
82 tree outside the source tree is a key feature, ensuring that if a build
93 This command will configure and write build script or solution to CMakeBuild
96 [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
97 with `-G` command line parameter:
99 cmake .. -G"Unix Makefiles"
101 The build procedure depends on the selected generator. With "Unix Makefiles" you
107 from `CMakeBuild` directory and build using IDE.
111 cmake --build .
113 CMake also provides Qt-based cross platform GUI, cmake-gui. Using it is trivial
121 * `CMAKE_C_FLAGS` - additional C compiler flags
122 * `CMAKE_BUILD_TYPE` - configuration type, `DEBUG`, `RELEASE`, `RELWITHDEBINFO`
124 * `CMAKE_INSTALL_PREFIX` - build install location, the same as `--prefix` option
129 * `BUILD_SHARED_LIBS` - build shared library (DLL under Windows) when `ON`,
130 build static library othervise. This option is `OFF` by default.
131 * `BUILD_PROGRAMS` - build libsndfile's utilities from `programs/` directory,
133 * `BUILD_EXAMPLES` - build examples, `ON` by default.
134 * `BUILD_TESTING` - build tests. Then you can run tests with `ctest` command,
136 * `ENABLE_EXTERNAL_LIBS` - enable Ogg, Vorbis, FLAC and Opus support. This
138 * `ENABLE_MPEG` - MP3 support. This option is available and set to `ON` if all
140 * `ENABLE_CPU_CLIP` - enable tricky cpu specific clipper. Enabled and set to
142 * `ENABLE_BOW_DOCS` - enable black-on-white documentation theme, `OFF` by
144 * `ENABLE_EXPERIMENTAL` - enable experimental code. Don't use it if you are
146 * `ENABLE_CPACK` - enable [CPack](https://cmake.org/cmake/help/latest/module/CPack.html) support.
148 …ACKAGE_CONFIG` - generate and install [package config file](https://cmake.org/cmake/help/latest/ma…
149 * `INSTALL_PKGCONFIG_MODULE` - generate and install [pkg-config module](https://people.freedesktop.…
150 * `INSTALL_MANPAGES` - install [man pages](https://en.wikipedia.org/wiki/Man_page) for programs. Th…
151 * `ENABLE_STATIC_RUNTIME` - enable static runtime on Windows platform (MSVC and
160 * `ENABLE_COMPATIBLE_LIBSNDFILE_NAME` - set DLL name to `libsndfile-1.dll`
161 (canonical name) on Windows platform, `sndfile.dll` otherwise, `OFF` by
163 DLL name on Windows platform is `libsndfile-1.dll`, because the only way to
164 build Windows library before was MinGW toolchain with Autotools. This name
166 rules from `sndfile` target. But when you build with CMake using native
167 Windows compiler, the name is `sndfile.dll`. This is name for native Windows
168 platform, because Windows has no library naming rules. It is preffered
172 * `ENABLE_SSE2` - add compiler flag to enable SSE2 if required, `ON` by default.
184 * `DISABLE_EXTERNAL_LIBS` - disable Ogg, Vorbis and FLAC support. Replaced by
186 * `DISABLE_CPU_CLIP` - disable tricky cpu specific clipper. Replaced by
188 * `BUILD_STATIC_LIBS` - build static library. Use `BUILD_SHARED_LIBS` instead
227 ### Notes for Windows users
231 … CRT libraries](https://docs.microsoft.com/en-us/cpp/c-runtime-library/c-run-time-library-referenc…
236 C/C++ -> Code Generation -> Runtime Library
242 …"The program can't start because <crt-dll-name>.dll is missing from your computer. Try reinstallin…
261 cmake .. -D"MultiThreaded$<$<CONFIG:Debug>:Debug>"
267 cmake .. -DENABLE_STATIC_RUNTIME=ON
275 libraries under Windows is a little bit tricky. The best way is to use
280 -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake
284 -DVCPKG_TARGET_TRIPLET=x64-windows-static
296 -DVCPKG_MANIFEST_MODE=OFF
300 vcpkg install libvorbis:x64-windows-static libflac:x64-windows-static
301 opus:x64-windows-static mp3lame:x86-windows-static mpg123:x86-windows-static
302 libvorbis:x86-windows-static libflac:x86-windows-static
303 opus:x86-windows-static mp3lame:x86-windows-static mpg123:x86-windows-static
306 libsndfile library itself. For `*-static` triplets Vcpkg uses
315 [BuildingForAndroid]: https://github.com/libsndfile/libsndfile/blob/master/Building-for-Android.md