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 Binaries are located in the 'bin' directory.
59 Main available cmake flags:
60 * To specify the install path: '-DCMAKE_INSTALL_PREFIX=/path'
61 * To build the shared libraries and links the executables against it: '-DBUILD_SHARED_LIBS:bool=on' (default: 'ON')
62 Note: when using this option, static libraries are not built and executables are dynamically linked.
63 * To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON')
64 * To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF')
65 * To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF')
66 * [WIN32 ONLY] To build the INDEXER_JPIP executable: '-DBUILD_INDEXER_JPIP:bool=on' (default: 'OFF')
67 * To build the doxygen documentation: '-DBUILD_DOC:bool=on' (default: 'OFF')
68 * To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG):
69 cmake . -DBUILD_TESTING:BOOL=ON -DJPEG2000_CONFORMANCE_DATA_ROOT:PATH=/path/to/your/JPEG2000/test/files
72 Note : JPEG2000 test files are available here : http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
74 3) Manually using Makefile.nix:
75 - Manually edit the config.nix file
76 - Manually create an opj_config.h file from opj_config.h.in.user
77 and edit this opj_config.h
78 - Then : (if 'WITH_JPWL' is defined in config.nix)
79 make -f Makefile.nix all
80 make -f Makefile.nix install
81 make -f Makefile.nix clean
82 make -f Makefile.nix uninstall
83 - If 'WITH_JPWL' is not defined in config.nix
84 and you want to clean/compile/install/uninstall JPWL:
85 call the respective target in the respective directory.
90 The same building procedures as above (autotools and cmake) work for MACOSX.
91 The xcode project file can also be used.
93 If it does not work, try adding the following flag to the cmake command :
94 '-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
99 If you're using cygwin or MinGW, the same procedures as for Unix can be used.
101 Otherwise you can use cmake to generate project files for the IDE you are using (VC2010, etc).
102 Type 'cmake --help' for available generators on your platform.