Changes between Initial Version and Version 1 of SV8Build


Ignore:
Timestamp:
12/10/08 23:42:23 (16 years ago)
Author:
r2d
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SV8Build

    v1 v1  
     1 = Building sv8 tools =
     2
     3This page shows how to build libmpc using [http://www.cmake.org cmake] with the command line. The examples are from a Linux system, but cmake can be used on Windows to generate msvc project files. You may feel more comfortable using the cmake GUI.
     4
     5 == Getting the sources ==
     6First, you need the sources. You can browse [source: musepack svn] for a complete view.[[BR]]
     7libmpc needs libcuefile for reading .cue files to import chapters informations. This is the same libcuefile as in [http://developer.berlios.de/projects/cuetools cuetools], but we made it a standalone library for our use.[[BR]]
     8Also libreplaygain is needed to build mpcgain application.[[BR]]
     9So, here we go :
     10{{{
     11$ mkdir musepack
     12$ cd musepack
     13$ svn export http://svn.musepack.net/libmpc/trunk libmpc
     14$ svn export http://svn.musepack.net/libcuefile libcuefile
     15$ svn export http://svn.musepack.net/libreplaygain libreplaygain
     16}}}
     17You now got the sources
     18
     19 == libcuefile ==
     20 === compiling ===
     21Move to the libcuefile directory :
     22{{{
     23$ cd libcuefile
     24}}}
     25Generate makefiles :
     26{{{
     27$ cmake -G "Unix Makefiles"
     28}}}
     29If you want to build other projects files (ex : msvc), check the available generators on your system using the cmake help command (at the end of the output) :
     30{{{
     31$ cmake --help
     32cmake version 2.6-patch 2
     33
     34[...]
     35
     36The following generators are available on this platform:
     37  Unix Makefiles              = Generates standard UNIX makefiles.
     38  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
     39  Eclipse CDT4 - Unix Makefiles
     40                              = Generates Eclipse CDT 4.0 project files.
     41  KDevelop3                   = Generates KDevelop 3 project files.
     42  KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files.
     43}}}
     44Now we are ready to build :
     45{{{
     46$ make
     47}}}
     48 === installing ===
     49There may be a make install command, but the current CMakeLists.txt doesn't properly install the lib (the include dir is not installed). Contributions welcome !
     50
     51 == libreplaygain ==
     52 === compiling ===
     53Compiling libreplaygain is as easy as libcuefile :
     54{{{
     55$ cd ../libreplaygain
     56$ cmake -G "Unix Makefiles"
     57$ make
     58}}}
     59 === installing ===
     60I fear make install doesn't install the include file heather.
     61
     62 == libmpc ==
     63 === compiling ===
     64Cmake needs to know where to find the two libs above and their includes. It will probably guess right for most of them, but the following values needs to be known : CUEFILE_INCLUDE_DIR, CUEFILE_LIBRARY, REPLAY_GAIN_INCLUDE_DIR and REPLAY_GAIN_LIBRARY.[[BR]]
     65You can check this :
     66{{{
     67$ cd ../libmpc
     68$ cmake -L
     69-- The C compiler identification is GNU
     70-- Check for working C compiler: /usr/bin/gcc
     71-- Check for working C compiler: /usr/bin/gcc -- works
     72-- Detecting C compiler ABI info
     73-- Detecting C compiler ABI info - done
     74-- Check if the system is big endian
     75-- Searching 16 bit integer
     76-- Looking for sys/types.h
     77-- Looking for sys/types.h - found
     78-- Looking for stdint.h
     79-- Looking for stdint.h - found
     80-- Looking for stddef.h
     81-- Looking for stddef.h - found
     82-- Check size of unsigned short
     83-- Check size of unsigned short - done
     84-- Using unsigned short
     85-- Check if the system is big endian - little endian
     86CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
     87Please set them or make sure they are set and tested correctly in the CMake files:
     88REPLAY_GAIN_LIBRARY
     89    linked by target "mpcgain" in directory /your/path/musepack/libmpc/mpcgain
     90
     91-- Configuring incomplete, errors occurred!
     92-- Cache values
     93CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
     94CMAKE_BUILD_TYPE:STRING=
     95CMAKE_INSTALL_PREFIX:PATH=/usr/local
     96CUEFILE_INCLUDE_DIR:PATH=/your/path/musepack/libcuefile/include
     97CUEFILE_LIBRARY:FILEPATH=/your/path/musepack/libcuefile/src/libcuefile.a
     98EXECUTABLE_OUTPUT_PATH:PATH=
     99LIBRARY_OUTPUT_PATH:PATH=
     100REPLAY_GAIN_INCLUDE_DIR:PATH=/your/path/musepack/libreplaygain/include
     101REPLAY_GAIN_LIBRARY:FILEPATH=REPLAY_GAIN_LIBRARY-NOTFOUND
     102}}}
     103As you can see REPLAY_GAIN_LIBRARY:FILEPATH was not found on my system. So we say it were to find it :
     104{{{
     105$ cmake -DREPLAY_GAIN_LIBRARY:FILEPATH=/your/path/musepack/libreplaygain/src/libreplaygain.so
     106}}}
     107And we are now ready to build :
     108{{{
     109$ make
     110}}}
     111All the built executables are found in there respective directories. Note that libmpcdec is not built as a shared library here. Use the autotools build system to build it as a shared library, or provide a patch to build it as static on the Windows platform and shared on others platforms.
     112
     113 === installing ===
     114Guess what ?