workaround for name clash when building static and dynamic on WIN32 (see http://www...
[openjpeg.git] / INSTALL
1
2 How to build and install openjpeg binaries
3 ==========================================
4
5 UNIX/LINUX similar systems
6 --------------------------
7
8 1) Using configure tools
9
10 You can simply type
11   ./configure [--prefix=/path]
12   make
13
14 If you are root:
15   make install
16   make clean
17   make distclean
18
19 else:
20   sudo make install
21   make clean
22   make distclean
23
24 Binaries are located in the 'bin' directory.
25
26 If 'configure' does not work on your system please
27 call './bootstrap.sh'.
28
29 If 'configure' does not find a library or header file,
30 or to see available configure options, please try 
31 './configure --help'.
32
33 Note: if Doxygen is found on your system, a target 'docs'
34 will automatically be created in 'doc/Makefile'. To build
35 the documentation (it will create an 'html' directory):
36   cd doc
37         make docs
38
39 2) Using cmake (see www.cmake.org)
40
41 Type:
42   cmake .
43   make
44
45 If you are root:
46   make install
47   make clean
48
49 else:
50   sudo make install
51   make clean
52
53 Binaries are located in the 'bin' directory.
54 Executables are always statically linked.
55
56 Main available cmake flags:
57 * To specify the install path: '-DCMAKE_INSTALL_PREFIX=/path'
58 * To build the shared libraries: '-DBUILD_SHARED_LIBS:bool=on' (default: 'ON')
59   Note: when using this option, shared libraries are built but executables remain linked against the corresponding static libraries.
60 * To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON')
61 * To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF')
62 * To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF')
63 * To build the JP3D executables and JP3D library: '-DBUILD_JP3D:bool=on' (default: 'OFF')
64 * [WIN32 ONLY] To build the INDEXER_JPIP executable: '-DBUILD_INDEXER_JPIP:bool=on' (default: 'OFF')
65 * To build the doxygen documentation: '-DBUILD_DOC:bool=on' (default: 'OFF')
66 * To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG):
67     cmake . -DBUILD_TESTING:BOOL=ON -DJPEG2000_CONFORMANCE_DATA_ROOT:PATH=/path/to/your/JPEG2000/test/files
68     make
69     make Experimental
70   Note : JPEG2000 test files are available here : http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
71
72 3) Manually using Makefile.nix:
73 - Manually edit the config.nix file
74 - Manually create an opj_config.h file from opj_config.h.in.user
75   and edit this opj_config.h
76 - Then : (if 'WITH_JPWL' and/or 'WITH_JP3D' are defined in config.nix)
77     make -f Makefile.nix all
78     make -f Makefile.nix install
79     make -f Makefile.nix clean
80     make -f Makefile.nix uninstall
81 - If neither 'WITH_JPWL' nor 'WITH_JP3D' is defined in config.nix
82   and you want to clean/compile/install/uninstall JPWL/JP3D:
83   call the respective target in the respective directory.
84
85 MACOSX
86 ------
87
88 The same building procedures as above will soon be available for MACOSX.
89 The xcode project file has also to be updated.
90 Right now, the CMake procedure is the only one working. Please refer to instructions above.
91 If it does not work, try adding the following flag to the cmake command : 
92   '-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
93
94 WINDOWS
95 -------
96
97 If you're using cygwin, the same procedures as for Unix should work. Otherwise:
98
99 1) Using cmake to generate project files
100
101 Use the cmake procedure above with the '-G <generator-name>' flag to generate the project
102 files for the IDE you are using. Type 'cmake --help' for available generators on your platform.
103
104 2) Using the provided project files
105
106 These files are obsolete and will be updated soon.