2 How to build and install openjpeg binaries
3 ==========================================
5 UNIX/LINUX similar systems
6 --------------------------
8 1) Using configure tools
10 To build from top-level directory, you can simply type:
15 To keep all build files in a separate directory, you can type instead:
29 To build doc (requires 'doxygen' to be found on your system):
30 (this will create an html directory in TOP_LEVEL/doc)
33 Main './configure' options (type './configure --help' for more details)
36 '--prefix=/path/to/install/directory' (example : '--prefix=$PWD/installed')
37 '--enable-debug' (default : disabled)
39 You can also specify your own CFLAGS and LDFLAGS with (for example):
40 CFLAGS="-O3 -pipe" LDFLAGS="-Wl,-s" ./configure
43 2) Using cmake (see www.cmake.org)
57 To build the Doxygen documentation (Doxygen needs to be found on the system):
58 (A 'html' directory is generated in the 'doc' directory)
61 Binaries are located in the 'bin' directory.
63 Main available cmake flags:
64 * To specify the install path: '-DCMAKE_INSTALL_PREFIX=/path'
65 * To build the shared libraries and links the executables against it: '-DBUILD_SHARED_LIBS:bool=on' (default: 'ON')
66 Note: when using this option, static libraries are not built and executables are dynamically linked.
67 * To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON')
68 * To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF')
69 * To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF')
70 * To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG):
71 cmake . -DBUILD_TESTING:BOOL=ON -DJPEG2000_CONFORMANCE_DATA_ROOT:PATH=/path/to/your/JPEG2000/test/files
74 Note : JPEG2000 test files are available here : http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
76 3) Manually using Makefile.nix:
77 - Manually edit the config.nix file
78 - Manually create an opj_config.h file from opj_config.h.in.user
79 and edit this opj_config.h
80 - Then : (if 'WITH_JPWL' is defined in config.nix)
81 make -f Makefile.nix all
82 make -f Makefile.nix install
83 make -f Makefile.nix clean
84 make -f Makefile.nix uninstall
85 - If 'WITH_JPWL' is not defined in config.nix
86 and you want to clean/compile/install/uninstall JPWL:
87 call the respective target in the respective directory.
92 The same building procedures as above (autotools and cmake) work for MACOSX.
93 The xcode project file can also be used.
95 If it does not work, try adding the following flag to the cmake command :
96 '-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
101 If you're using cygwin or MinGW, the same procedures as for Unix can be used.
103 Otherwise you can use cmake to generate project files for the IDE you are using (VC2010, etc).
104 Type 'cmake --help' for available generators on your platform.