Try to fix MinGW build.
[libdcp.git] / README.md
1 libdcp
2 ======
3
4 Library for reading and writing Digital Cinema Packages (DCPs).
5
6
7 Acknowledgements
8 ================
9
10 Wolfgang Woehl's cinemaslides was most informative on the
11 nasty details of encryption.
12
13 libdcp is written by Carl Hetherington and Mart Jansink.
14 Bugfixes were received from Philip Tschiemer.
15
16
17 Building
18 ========
19
20 ```
21   ./waf configure
22   ./waf
23   sudo ./waf install
24 ```
25
26
27 Dependencies
28 --------
29
30 - pkg-config (for build system)
31 - boost (1.45 or above): filesystem, signals2, datetime and unit testing libraries
32 - openssl
33 - libsigc++
34 - libxml++
35 - xmlsec
36 - ImageMagick or GraphicsMagick
37 - sndfile
38 - openjpeg (1.5.0 or above)
39 - [libasdcp-cth](https://github.com/cth103/asdcplib-cth/tree/cth)
40 - [libcxml](https://github.com/cth103/libcxml)
41 - (optional) OpenMP
42 - (optional) gcov (for tests)
43
44
45 Build options
46 ---------
47 ```
48   --target-windows      set up to do a cross-compile to Windows
49   --enable-debug        build with debugging information and without optimisation
50   --static              build libdcp statically, and link statically to openjpeg, cxml, asdcplib-cth
51   --disable-tests       disable building of tests
52   --disable-gcov        dont use gcov in tests
53   --disable-examples    disable building of examples
54   --enable-openmp       enable use of OpenMP
55   --openmp=OPENMP       Specify OpenMP Library to use: omp, gomp (default), iomp..
56   --jpeg=JPEG           specify JPEG library to build with: oj1 or oj2 for OpenJPEG 1.5.x or OpenJPEG 2.1.x respectively
57   --force-cpp11         force use of C++11
58 ```
59
60 A note on building for macOS
61 --------
62 As goto solution, all dependencies can be installed using [Homebrew](https://brew.sh/).
63 Make sure to add the respective `PKG_CONFIG_PATH` paths so the packages are indeed found.
64
65 ```bash
66 ## Default Homebrew paths
67 PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
68 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/pangomm/lib/pkgconfig"
69 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig" # needed by gobject2
70 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
71 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
72
73 ## Set as installed
74 # PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/path-to-your-install-folder/libasdcp-cth"
75 # PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/path-to-your-install-folder/libcxml"
76
77 export PKG_CONFIG_PATH
78 ```
79
80 If you want support for *OpenMP*, the standard llvm compiler coming with Xcode (or rather its command line tools) does not support it such that you will have to override the compiler (using the `CXX` environment variable).
81 The version provided through Homebrew will work (or any of your choice) along with `--openmp=omp`.
82
83 ```bash
84 ## Default Homebrew path
85 export CXX=/usr/local/opt/llvm/bin/clang++
86 ```
87
88
89 Documentation
90 =============
91
92 Run doxygen in the top-level directory and then see build/doc/html/index.html.
93
94 There are some examples in the examples/ directory.