CMake: needs v3.6 or later
Git: optional, for version numbers
GCC / Make
MSVC / Visual Studio
If building the CLI for *nix-based OSes, vgmstream123 also needs the following:
If building for *nix-based OSes, the following libraries are optional:
See BUILD.md's Compilation requirements for more info about various component and installation.
It is recommended to do out-of-source builds as opposed to in-source builds. Out-of-source builds have been tested to work, while in-source builds have not been tested at all.
NOTE: The CMake scripts attempt to collect all the source files are configuration time. If you are following vgmstream development through git or adding your own source files, you MUST re-run CMake manually to regenerate the files. Failure to do so can result in either missing functionality or compile errors.
First you will need to run CMake to generate the build setup. You can use either the CMake GUI or run CMake from the command line.
If you have access to the CMake GUI, you can use that to create your build setup. Select where the source code is (that should be the directory just above this one) and where you wish to build to.
You may have to add some entries before configuring will succeed. See the CMake Cache Entries section for details on the entries.
Once the entries are in place, you can click on Generate (or Configure then Generate). This should ask you what build system you wish to use. As long as there are no errors, you should see the following at the bottom of the window:
Configuring done
Generating done
Before that you'll see what options are enabled and disabled, what is going to be built and where they will be installed to.
If you decided to build for a project-based GUI, you can click on Open Project to open that. (NOTE: Only Visual Studio has been tested as a project-based GUI.) If you decided to build for a command line build system, you can open up the command line for the build directory and run your build system.
If you don't have access to the CMake GUI or would prefer to only use the command line, you can run CMake from there. Navigate to the directory you wish to build to and run the following:
cmake -G "<generator>" <options> <path to source code>
Replace <generator>
with the CMake generator you wish to use as your build system. Make note of the quotes, and use cmake -h
to get a list of generators for your system.
You may have to add some entries before configuring will success. See the CMake Cache Entries section for details on the entries.
Place your entries in the <options>
section of the above command, with each option in the form of -D<optionname>:<type>=<value>
. Replace <path to source code>
with the path where the source code is (that should be the directory just above this one).
Once you have run the command, as long as there are no errors, you should see the following at the bottom of the window:
Configuring done
Generating done
Before that you'll see what options are enabled and disabled, what is going to be built and where they will be installed to.
You can now run the build system you chose as your generator above, whether that be a command line build system like Unix Make or a project-based GUI like Eclipse.
The following are the various options and cache entries that you can choose to use when building vgmstream.
If not using a project-based GUI, then you will also need to set what build type you want. This can be set with the CMAKE_BUILD_TYPE
option and takes one of the following values:
All of these options are of type BOOL and can be set to either ON
or OFF
. Most of the details on these libraries can be found in the External Libraries section of BUILD.md.
QAAC_PATH
and FDK_AAC_PATH
to also be given if the option is ON
. The default for is ON
. See the foobar2000 plugin section of BUILD.md for more information on this.ON
.ON
.ON
.OFF
. It is not recommended to enable.ON
.The following options are currently only available for Windows:
ON
.ON
.ON
.ON
.All of these options are of type BOOL and can be set to either ON
or OFF
.
ON
.The following options are only available for Windows:
FB2K_SDK_PATH
and WTL_INCLUDE_PATH
to also be given if this option is ON
. The default for is ON
.ON
.ON
.The following option is only available for *nix-based OSes:
ON
.All of these paths are of type PATH.
If FDK-AAC/QAAC support is enabled, the following paths are required (with more details in the foobar2000 plugin section of BUILD.md):
If MAIATRAC3+ support is enabled, the following path is required:
The CLI/vgmstream123 programs are normally installed to CMAKE_INSTALL_PREFIX
, changing this will change where those are installed.
If building the foobar2000 component, the following paths are required:
components
directory of the foobar2000 installation. Otherwise you'll want to set this to the user-components
directory of your foobar2000 folder within your profile, the location of which depends on your current OS. The component as well as the required DLLs will be installed in this directory.If building the Winamp plugin, the following path is required:
winamp.exe
and the plugin itself will be installed to the Plugins
directory.If building the XMPlay plugin, the following path is required:
If building the Audacious plugin, no path needs to be given, it will be found by CMake.
After the above build has been done, the programs and plugins can be installed with CMake as well. For project-based GUIs, running the INSTALL
target will install the files. For command line build systems, use the install
target.