2 How to build and install openjpeg binaries
3 ==========================================
5 UNIX/LINUX similar systems
6 --------------------------
10 It is highly recommended that pkg-config is installed. If needed, you have to
11 properly set the environment variable PKG_CONFIG_PATH so that the .pc files
14 To build from top-level directory, you can simply type:
19 To keep all build files in a separate directory, you can type instead:
33 To build doc (requires 'doxygen' to be found on your system):
34 (this will create an html directory in TOP_LEVEL/doc)
37 Main './configure' options (type './configure --help' for more details)
41 '--prefix=/path/to/install/directory' (example : '--prefix=$PWD/installed')
42 '--enable-debug' (default : disabled)
44 You can also specify your own CFLAGS and LDFLAGS with (for example):
45 CFLAGS="-O3 -pipe" LDFLAGS="-Wl,-s" ./configure
47 The (optional) dependencies of some binaries are libpng, libtiff, libcms 1 or 2
48 and FastCGI. Only libtiff and FastCGI have no .pc file. There should be some
49 automatic detection if they are installed in /usr, /usr/local or /opt/local.
50 Otherwise, you can tune their detection (as well as for libpng and libcms1 or 2
51 too) with the environment variables:
58 See './configure --help' output for more details.
61 2) Using cmake (see www.cmake.org)
70 else if you have sudo power:
74 DESTDIR=$HOME/local make install
76 To build the Doxygen documentation (Doxygen needs to be found on the system):
77 (A 'html' directory is generated in the 'doc' directory)
80 Binaries are located in the 'bin' directory.
82 Main available cmake flags:
83 * To specify the install path: '-DCMAKE_INSTALL_PREFIX=/path', or use DESTDIR env variable (see above)
84 * To build the shared libraries and links the executables against it: '-DBUILD_SHARED_LIBS:bool=on' (default: 'ON')
85 Note: when using this option, static libraries are not built and executables are dynamically linked.
86 * To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON')
87 * To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF')
88 * To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF')
89 * To build the JPIP library and utilities: '-DBUILD_JPIP:bool=on' (default: 'OFF')
90 * To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG):
91 cmake . -DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT:PATH='path/to/the/data/directory'
94 Note : JPEG2000 test files are available with 'svn checkout http://openjpeg.googlecode.com/svn/data' (about 70 Mo).
95 If '-DOPJ_DATA_ROOT:PATH' option is omitted, test files will be automatically searched in '${CMAKE_SOURCE_DIR}/../data',
96 corresponding to the location of the data directory when compiling from the trunk (and assuming the data directory has
97 been checked out of course).
102 The same building procedures as above (autotools and cmake) work for MACOSX.
103 The xcode project file can also be used.
105 If it does not work, try adding the following flag to the cmake command :
106 '-DCMAKE_OSX_ARCHITECTURES:STRING=i386'
111 If you're using cygwin or MinGW+MSYS, the same procedures as for Unix can be used.
113 Otherwise you can use cmake to generate project files for the IDE you are using (VC2010, etc).
114 Type 'cmake --help' for available generators on your platform.