Lines Matching +full:windows +full:- +full:cmake +full:- +full:tests
1 Building libjpeg-turbo
6 ------------------
11 - [CMake](http://www.cmake.org) v2.8.12 or later
13 - [NASM](http://www.nasm.us) or [YASM](http://yasm.tortall.net)
14 (if building x86 or x86-64 SIMD extensions)
19 - NOTE: Currently, if it is desirable to hide the SIMD function symbols in
21 libjpeg-turbo, then NASM 2.14 or later or YASM must be used when
22 building libjpeg-turbo.
23 * If building on Windows, **nasm.exe**/**yasm.exe** should be in your `PATH`.
36 ARCH=`uname -m`
37 rpmbuild --rebuild nasm-{version}.src.rpm
38 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
45 - GCC v4.1 (or later) or Clang recommended for best performance
47 - If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
53 * If using JDK 11 or later, CMake 3.10.x or later must also be used.
55 ### Windows subsection
57 - Microsoft Visual C++ 2005 or later
62 which includes everything necessary to build libjpeg-turbo.
64 * You can also download and install the standalone Windows SDK (for Windows 7
65 or later), which includes command-line versions of the 32-bit and 64-bit
67 * If you intend to build libjpeg-turbo from the command line, then add the
72 * If built with Visual C++ 2015 or later, the libjpeg-turbo static libraries
74 * The libjpeg API DLL (**jpeg{version}.dll**) will depend on the C run-time
79 - MinGW
81 [MSYS2](http://msys2.github.io/) or [tdm-gcc](http://tdm-gcc.tdragon.net/)
82 recommended if building on a Windows machine. Both distributions install a
86 - If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
90 * If using JDK 11 or later, CMake 3.10.x or later must also be used.
93 Out-of-Tree Builds
94 ------------------
97 which CMake is executed (the "binary directory"), and this directory need not
98 necessarily be the same as the libjpeg-turbo source directory. You can create
100 libjpeg-turbo can be built from the same source tree using different compilers
102 directory, whereas *{source_directory}* refers to the libjpeg-turbo source
103 directory. For in-tree builds, these directories are the same.
107 -----
114 ---------------
116 NOTE: The build procedures below assume that CMake is invoked from the command
117 line, but all of these procedures can be adapted to the CMake GUI as
123 The following procedure will build libjpeg-turbo on Unix and Unix-like systems.
124 (On Solaris, this generates a 32-bit build. See "Build Recipes" below for
125 64-bit build instructions.)
128 cmake -G"Unix Makefiles" [additional CMake flags] {source_directory}
138 **cygjpeg-{version}.dll** (Cygwin)<br>
157 **cygturbojpeg-0.dll** (Cygwin)<br>
171 cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {source_directory}
174 This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
179 **jpeg-static.lib**<br>
188 **turbojpeg-static.lib**<br>
203 Choose the appropriate CMake generator option for your version of Visual Studio
204 (run `cmake` with no arguments for a list of available generators.) For
208 cmake -G"Visual Studio 10" [additional CMake flags] {source_directory}
211 to build a 64-bit version of libjpeg-turbo. A separate build directory must be
212 used for 32-bit and 64-bit builds.
216 build of libjpeg-turbo.
220 **{configuration}/jpeg-static.lib**<br>
229 **{configuration}/turbojpeg-static.lib**<br>
245 NOTE: This assumes that you are building on a Windows machine using the MSYS
246 environment. If you are cross-compiling on a Un*x platform (including Mac and
250 cmake -G"MSYS Makefiles" [additional CMake flags] {source_directory}
258 **libjpeg-{version}.dll**<br>
279 Add `-DCMAKE_BUILD_TYPE=Debug` to the CMake command line. Or, if building
280 with NMake, remove `-DCMAKE_BUILD_TYPE=Release` (Debug builds are the default
286 Add `-DWITH_JPEG7=1` to the CMake command line to build a version of
287 libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add `-DWITH_JPEG8=1`
288 to the CMake command line to build a version of libjpeg-turbo that is
289 API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
293 ### In-Memory Source/Destination Managers
295 When using libjpeg v6b or v7 API/ABI emulation, add `-DWITH_MEM_SRCDST=0` to
296 the CMake command line to build a version of libjpeg-turbo that lacks the
305 included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
309 add `-DWITH_ARITH_ENC=0` or `-DWITH_ARITH_DEC=0` to the CMake command line to
315 Add `-DWITH_JAVA=1` to the CMake command line to incorporate an optional Java
317 Java front-end classes to support it. This allows the TurboJPEG shared library
322 build/test libjpeg-turbo, then (prior to running CMake) set the `JAVA_HOME`
325 CMake variables can also be used to specify alternate commands or locations for
327 `CMAKE_JAVA_COMPILE_FLAGS` CMake variable or the `JAVAFLAGS` environment
329 building the TurboJPEG classes, and the `JAVAARGS` CMake variable to specify
331 tests.
335 -------------
338 ### 32-bit Build on 64-bit Linux/Unix
341 CMake:
343 CFLAGS=-m32
344 LDFLAGS=-m32
347 ### 64-bit Build on Solaris
350 CMake:
352 CFLAGS=-m64
353 LDFLAGS=-m64
358 On Un*x systems, prior to running CMake, you can set the `CC` environment
362 ### 32-bit MinGW Build on Un*x (including Mac and Cygwin)
364 Create a file called **toolchain.cmake** under *{build_directory}*, with the
367 set(CMAKE_SYSTEM_NAME Windows)
369 set(CMAKE_C_COMPILER {mingw_binary_path}/i686-w64-mingw32-gcc)
370 set(CMAKE_RC_COMPILER {mingw_binary_path}/i686-w64-mingw32-windres)
376 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
377 [additional CMake flags] {source_directory}
381 ### 64-bit MinGW Build on Un*x (including Mac and Cygwin)
383 Create a file called **toolchain.cmake** under *{build_directory}*, with the
386 set(CMAKE_SYSTEM_NAME Windows)
388 set(CMAKE_C_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-gcc)
389 set(CMAKE_RC_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-windres)
395 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
396 [additional CMake flags] {source_directory}
400 Building libjpeg-turbo for iOS
401 ------------------------------
405 advantage of libjpeg-turbo's SIMD extensions to significantly accelerate JPEG
406 compression/decompression. This section describes how to build libjpeg-turbo
410 ### Armv8 (64-bit)
414 The following script demonstrates how to build libjpeg-turbo to run on the
419 export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=8.0 -funwind-tables"
423 cat <<EOF >toolchain.cmake
429 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
430 -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
431 [additional CMake flags] {source_directory}
435 Building libjpeg-turbo for Android
436 ----------------------------------
438 Building libjpeg-turbo for Android platforms requires v13b or later of the
442 ### Armv7 (32-bit)
450 NDK_PATH={full path to the NDK directory-- for example,
451 /opt/android/android-ndk-r16b}
452 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r16b and earlier,
454 ANDROID_VERSION={the minimum version of Android to support-- for example,
458 cmake -G"Unix Makefiles" \
459 -DANDROID_ABI=armeabi-v7a \
460 -DANDROID_ARM_MODE=arm \
461 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
462 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
463 -DCMAKE_ASM_FLAGS="--target=arm-linux-androideabi${ANDROID_VERSION}" \
464 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
465 [additional CMake flags] {source_directory}
469 ### Armv8 (64-bit)
477 NDK_PATH={full path to the NDK directory-- for example,
478 /opt/android/android-ndk-r16b}
479 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
482 is required for a 64-bit build.}
485 cmake -G"Unix Makefiles" \
486 -DANDROID_ABI=arm64-v8a \
487 -DANDROID_ARM_MODE=arm \
488 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
489 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
490 -DCMAKE_ASM_FLAGS="--target=aarch64-linux-android${ANDROID_VERSION}" \
491 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
492 [additional CMake flags] {source_directory}
496 ### x86 (32-bit)
502 NDK_PATH={full path to the NDK directory-- for example,
503 /opt/android/android-ndk-r16b}
504 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
506 ANDROID_VERSION={The minimum version of Android to support-- for example,
510 cmake -G"Unix Makefiles" \
511 -DANDROID_ABI=x86 \
512 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
513 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
514 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
515 [additional CMake flags] {source_directory}
519 ### x86-64 (64-bit)
525 NDK_PATH={full path to the NDK directory-- for example,
526 /opt/android/android-ndk-r16b}
527 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
530 is required for a 64-bit build.}
533 cmake -G"Unix Makefiles" \
534 -DANDROID_ABI=x86_64 \
535 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
536 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
537 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
538 [additional CMake flags] {source_directory}
542 Advanced CMake Options
543 ----------------------
545 To list and configure other CMake options not specifically mentioned in this
552 cmake-gui {source_directory}
555 text-based interactive version of CMake, and CMake-GUI is a GUI version. Both
556 will display all variables that are relevant to the libjpeg-turbo build, their
560 Installing libjpeg-turbo
563 You can use the build system to install libjpeg-turbo (as opposed to creating
567 the Visual Studio IDE) will uninstall libjpeg-turbo.
569 The `CMAKE_INSTALL_PREFIX` CMake variable can be modified in order to install
570 libjpeg-turbo into a directory of your choosing. If you don't specify
573 **c:\libjpeg-turbo**<br>
574 Visual Studio 32-bit build
576 **c:\libjpeg-turbo64**<br>
577 Visual Studio 64-bit build
579 **c:\libjpeg-turbo-gcc**<br>
580 MinGW 32-bit build
582 **c:\libjpeg-turbo-gcc64**<br>
583 MinGW 64-bit build
585 **/opt/libjpeg-turbo**<br>
588 The default value of `CMAKE_INSTALL_PREFIX` causes the libjpeg-turbo files to
590 libjpeg-turbo binary packages. Changing the value of `CMAKE_INSTALL_PREFIX`
591 (for instance, to **/usr/local**) causes the libjpeg-turbo files to be
596 `CMAKE_INSTALL_LIBDIR`, and `CMAKE_INSTALL_MANDIR` CMake variables allow a
597 finer degree of control over where specific files in the libjpeg-turbo
601 documentation to be installed in **${CMAKE\_INSTALL\_PREFIX}/doc**.) If a
605 **\<CMAKE\_INSTALL\_DATAROOTDIR\>/man**.
608 CMake command line, you must specify that the variable is of type `PATH`.
611 cmake -G"{generator type}" -DCMAKE_INSTALL_LIBDIR:PATH=lib {source_directory}
613 Otherwise, CMake will assume that the path is relative to the build directory
625 -----
629 Create Red Hat-style binary RPM package. Requires RPM v4 or later.
634 Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
638 Create Debian-style binary package. Requires dpkg.
642 ---
650 x86-64/Arm binaries, set the following CMake variable:
652 * `ARMV8_BUILD`: Directory containing an Armv8 (64-bit) iOS or macOS build of
653 libjpeg-turbo to include in the universal binaries
655 You should first use CMake to configure an Armv8 sub-build of libjpeg-turbo
656 (see "Building libjpeg-turbo for iOS" above, if applicable) in a build
657 directory that matches the one specified in the aforementioned CMake variable.
658 Next, configure the primary (x86-64) build of libjpeg-turbo as an out-of-tree
659 build, specifying the aforementioned CMake variable, and build it. Once the
661 packaging system will build the sub-build, use lipo to combine it with the
666 Windows section in Creating Distribution Packages
667 -------
681 The installer package (libjpeg-turbo-*{version}*[-gcc|-vc][64].exe) will be
687 Building a Windows installer requires the
695 The most common way to test libjpeg-turbo is by invoking `make test` (Un*x) or
696 `nmake test` (Windows command line) or by building the "RUN_TESTS" target
697 (Visual Studio IDE), once the build has completed. This runs a series of tests
699 libjpeg-turbo and libjpeg v6b. This also invokes the TurboJPEG unit tests,
705 Invoking `make testclean` (Un*x) or `nmake testclean` (Windows command line) or
707 images generated by the tests.
709 On Un*x platforms, more extensive tests of the TurboJPEG C and Java wrappers
710 can be run by invoking `make tjtest`. These extended TurboJPEG tests
712 that are not covered by the TurboJPEG unit tests (including the lossless
715 TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers,