• Home
  • Raw
  • Download

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 pkg-config python
43 brew install autoconf autogen automake flac libogg libtool libvorbis opus pkg-config
45 Once the build environment has been set up, building and testing libsndfile is
49 ./configure --enable-werror
53 ## The CMake build system
55 Although Autotools is the primary and recommended build toolchain, CMake meta
56 build generator is also available. The build process with CMake takes
57 place in two stages. First, standard build files are created from configuration
58 scripts. Then the platform's native build tools are used for the actual
60 Unix Makefiles, Xcode projects and [many more](https://cmake.org/cmake/help/latest/manual/cmake-gen…
67 1. C99-compliant compiler toolchain (tested with GCC, Clang and Visual
74 2. ALSA development package under Linux to build sndfile-play utility
75 3. Sndio development package under BSD to build sndfile-play utility
79 CMake can handle out-of-place builds, enabling several builds from
80 the same source tree, and cross-compilation. The ability to build a directory
81 tree outside the source tree is a key feature, ensuring that if a build
92 This command will configure and write build script or solution to CMakeBuild
95 [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
96 with `-G` command line parameter:
98 cmake .. -G"Unix Makefiles"
100 The build procedure depends on the selected generator. With "Unix Makefiles" you
106 from `CMakeBuild` directory and build using IDE.
110 cmake --build .
112 CMake also provides Qt-based cross platform GUI, cmake-gui. Using it is trivial
120 * `CMAKE_C_FLAGS` - additional C compiler flags
121 * `CMAKE_BUILD_TYPE` - configuration type, `DEBUG`, `RELEASE`, `RELWITHDEBINFO`
123 * `CMAKE_INSTALL_PREFIX` - build install location, the same as `--prefix` option
128 * `BUILD_SHARED_LIBS` - build shared library (DLL under Windows) when `ON`,
129 build static library othervise. This option is `OFF` by default.
130 * `BUILD_PROGRAMS` - build libsndfile's utilities from `programs/` directory,
132 * `BUILD_EXAMPLES` - build examples, `ON` by default.
133 * `BUILD_TESTING` - build tests. Then you can run tests with `ctest` command,
135 * `ENABLE_EXTERNAL_LIBS` - enable Ogg, Vorbis, FLAC and Opus support. This
137 * `ENABLE_CPU_CLIP` - enable tricky cpu specific clipper. Enabled and set to
139 * `ENABLE_BOW_DOCS` - enable black-on-white documentation theme, `OFF` by
141 * `ENABLE_EXPERIMENTAL` - enable experimental code. Don't use it if you are
143 * `ENABLE_CPACK` - enable [CPack](https://cmake.org/cmake/help/latest/module/CPack.html) support.
145 …ACKAGE_CONFIG` - generate and install [package config file](https://cmake.org/cmake/help/latest/ma…
146 * `INSTALL_PKGCONFIG_MODULE` - generate and install [pkg-config module](https://people.freedesktop.…
147 * `INSTALL_MANPAGES` - install [man pages](https://en.wikipedia.org/wiki/Man_page) for programs. Th…
148 * `ENABLE_STATIC_RUNTIME` - enable static runtime on Windows platform (MSVC and
157 * `ENABLE_COMPATIBLE_LIBSNDFILE_NAME` - set DLL name to `libsndfile-1.dll`
158 (canonical name) on Windows platform, `sndfile.dll` otherwise, `OFF` by
160 DLL name on Windows platform is `libsndfile-1.dll`, because the only way to
161 build Windows library before was MinGW toolchain with Autotools. This name
163 rules from `sndfile` target. But when you build with CMake using native
164 Windows compiler, the name is `sndfile.dll`. This is name for native Windows
165 platform, because Windows has no library naming rules. It is preffered
169 * `ENABLE_SSE2` - add compiler flag to enable SSE2 if required, `ON` by default.
181 * `DISABLE_EXTERNAL_LIBS` - disable Ogg, Vorbis and FLAC support. Replaced by
183 * `DISABLE_CPU_CLIP` - disable tricky cpu specific clipper. Replaced by
185 * `BUILD_STATIC_LIBS` - build static library. Use `BUILD_SHARED_LIBS` instead
224 ### Notes for Windows users
228 … CRT libraries](https://docs.microsoft.com/en-us/cpp/c-runtime-library/c-run-time-library-referenc…
233 C/C++ -> Code Generation -> Runtime Library
239 …"The program can't start because <crt-dll-name>.dll is missing from your computer. Try reinstallin…
258 cmake .. -D"MultiThreaded$<$<CONFIG:Debug>:Debug>"
264 cmake .. -DENABLE_STATIC_RUNTIME=ON
272 libraries under Windows is a little bit tricky. The best way is to use
276 vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static
277 libflac:x64-windows-static opus:x64-windows-static libogg:x86-windows-static
278 libvorbis:x86-windows-static libflac:x86-windows-static opus:x86-windows-static
282 -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake
286 -DVCPKG_TARGET_TRIPLET=x64-windows-static
289 libsndfile library itself. For `*-static` triplets Vcpkg uses
298 [BuildingForAndroid]: https://github.com/libsndfile/libsndfile/blob/master/Building-for-Android.md