| 1 | = Mandatory Prerequisites = |
| 2 | |
| 3 | * GCC, MSVC (9, 10, 11, 12), Xcode or Intel C/C++ |
| 4 | * CMake 2.8.8 or later http://www.cmake.org |
| 5 | * On linux, ccmake is helpful, usually a package named cmake-curses-gui |
| 6 | |
| 7 | Note: MSVC12 requires cmake 2.8.11 or later |
| 8 | |
| 9 | |
| 10 | = Optional Prerequisites = |
| 11 | |
| 12 | 1. Yasm 1.2.0 or later, to compile assembly primitives (performance) |
| 13 | |
| 14 | For Windows, download |
| 15 | http://www.tortall.net/projects/yasm/releases/yasm-1.2.0-win32.exe or |
| 16 | http://www.tortall.net/projects/yasm/releases/yasm-1.2.0-win64.exe |
| 17 | depending on your O/S and copy the EXE into C:\Windows or somewhere else |
| 18 | in your %PATH% that a 32-bit app (cmake) can find it. If it is not in the |
| 19 | path, you must manually tell cmake where to find it. |
| 20 | |
| 21 | For Linux, yasm-1.2.0 is likely too new to be packaged for your system so you |
| 22 | will need get http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz |
| 23 | compile, and install it. |
| 24 | |
| 25 | Once YASM is properly installed, run cmake to regenerate projects. If you |
| 26 | do not see the below line in the cmake output, YASM is not in the PATH. |
| 27 | |
| 28 | -- Found Yasm 1.2.0 to build assembly primitives |
| 29 | |
| 30 | Now build the encoder and run x265 -V. If you see "assembly" on this |
| 31 | line, you have YASM properly installed: |
| 32 | |
| 33 | x265 [info]: performance primitives: intrinsic assembly |
| 34 | |
| 35 | 2. VisualLeakDetector (Windows Only) |
| 36 | |
| 37 | Download from https://vld.codeplex.com/releases and install. May need |
| 38 | to re-login in order for it to be in your %PATH%. Cmake will find it |
| 39 | and enable leak detection in debug builds without any additional work. |
| 40 | |
| 41 | If VisualLeakDetector is not installed, cmake will complain a bit, but |
| 42 | it is completely harmless. |
| 43 | |
| 44 | |
| 45 | = Build Instructions Linux = |
| 46 | |
| 47 | 1. Use cmake to generate Makefiles: cmake ../source |
| 48 | 2. Build x265: make |
| 49 | |
| 50 | Or use our shell script which runs cmake then opens the curses GUI to |
| 51 | configure build options |
| 52 | |
| 53 | 1. cd build/linux ; ./make-Makefiles.bash |
| 54 | 2. make |
| 55 | |
| 56 | |
| 57 | = Build Instructions Windows = |
| 58 | |
| 59 | We recommend you use one of the make-solutions.bat files in the appropriate |
| 60 | build/ sub-folder for your preferred compiler. They will open the cmake-gui |
| 61 | to configure build options, click configure until no more red options remain, |
| 62 | then click generate and exit. There should now be an x265.sln file in the |
| 63 | same folder, open this in Visual Studio and build it. |
| 64 | |
| 65 | = Version number considerations = |
| 66 | |
| 67 | Note that cmake will update X265_VERSION each time cmake runs, if you are |
| 68 | building out of a Mercurial source repository. If you are building out of |
| 69 | a release source package, the version will not change. If Mercurial is not |
| 70 | found, the version will be "unknown". |