Search code examples
cmakemingwopenaloggmsys

How do I compile Alure with OGG support in Windows?


In Linux, it was cake. I simply ran make, and the OGG libraries were already installed in the right place and everything. I can play OGG files with Alure in Linux no problem.

Now, I am working on the Windows build. I was able to use cmake in MinGW Shell to generate MSYS Makefiles and then build the Alure library. However, I explicitly see messages indicating that I am missing OGG support.

********************** Configured options **********************
-- Building shared, static library
-- Building and installing examples
--
-- SndFile support: disabled
-- VorbisFile support: disabled
-- FLAC support: disabled
-- MPG123 support: disabled
-- DUMB support: disabled
-- ModPlug support: disabled
-- FluidSynth support: disabled
--
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/guest/alure-1.2

This is expected at first. However, after going off and building the win32 OGG/vorbis libraries, I have no idea where to put them while building Alure. Do the libs/includes need to be in a specific location relative to this folder? Or do I need to specify the location of the OGG library using some flag? (For example, I had to specify the location of libogg when building libvorbis via certain ./configure parameters.) I'm afraid I don't know enough about cmake or Alure to figure this part out.


Solution

  • Firstly, you can set all OGG-related cmake variables manually in builddir/CMakeCache.txt. You may use CMake GUI app to do it more conviently (they will showed in red).

    Another solution - set CMAKE_PREFIX_PATH to the directory, where your OGG library is installed.