• Home
  • Raw
  • Download

Lines Matching +full:cmake +full:-

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)
16 * If using NASM, 2.10 or later (except 2.11.08) is required for an x86-64 Mac
17 build (2.11.08 does not work properly with libjpeg-turbo's x86-64 SIMD code
22 - NOTE: Currently, if it is desirable to hide the SIMD function symbols in
24 libjpeg-turbo, then NASM 2.14 or later or YASM must be used when
25 building libjpeg-turbo.
39 ARCH=`uname -m`
40 rpmbuild --rebuild nasm-{version}.src.rpm
41 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
48 - GCC v4.1 (or later) or Clang recommended for best performance
50 - If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
58 * If using JDK 11 or later, CMake 3.10.x or later must also be used.
62 - Microsoft Visual C++ 2005 or later
66 [Windows SDK](http://msdn.microsoft.com/en-us/windows/bb980924.aspx).
67 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
68 everything necessary to build libjpeg-turbo.
72 build 32-bit code.)
73 * If you intend to build libjpeg-turbo from the command line, then add the
79 SDK. You can pass optional arguments to `SetEnv.cmd` to specify a 32-bit
80 or 64-bit build environment.
84 - MinGW
86 [MSYS2](http://msys2.github.io/) or [tdm-gcc](http://tdm-gcc.tdragon.net/)
91 - If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
95 * If using JDK 11 or later, CMake 3.10.x or later must also be used.
98 Out-of-Tree Builds
99 ------------------
102 which CMake is executed (the "binary directory"), and this directory need not
103 necessarily be the same as the libjpeg-turbo source directory. You can create
105 libjpeg-turbo can be built from the same source tree using different compilers
107 directory, whereas *{source_directory}* refers to the libjpeg-turbo source
108 directory. For in-tree builds, these directories are the same.
112 ---------------
114 NOTE: The build procedures below assume that CMake is invoked from the command
115 line, but all of these procedures can be adapted to the CMake GUI as
121 The following procedure will build libjpeg-turbo on Unix and Unix-like systems.
122 (On Solaris, this generates a 32-bit build. See "Build Recipes" below for
123 64-bit build instructions.)
126 cmake -G"Unix Makefiles" [additional CMake flags] {source_directory}
136 **cygjpeg-{version}.dll** (Cygwin)<br>
155 **cygturbojpeg-0.dll** (Cygwin)<br>
169 cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {source_directory}
172 This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
177 **jpeg-static.lib**<br>
186 **turbojpeg-static.lib**<br>
201 Choose the appropriate CMake generator option for your version of Visual Studio
202 (run `cmake` with no arguments for a list of available generators.) For
206 cmake -G"Visual Studio 10" [additional CMake flags] {source_directory}
209 to build a 64-bit version of libjpeg-turbo. A separate build directory must be
210 used for 32-bit and 64-bit builds.
214 build of libjpeg-turbo.
218 **{configuration}/jpeg-static.lib**<br>
227 **{configuration}/turbojpeg-static.lib**<br>
244 environment. If you are cross-compiling on a Un*x platform (including Mac and
248 cmake -G"MSYS Makefiles" [additional CMake flags] {source_directory}
256 **libjpeg-{version}.dll**<br>
277 Add `-DCMAKE_BUILD_TYPE=Debug` to the CMake command line. Or, if building
278 with NMake, remove `-DCMAKE_BUILD_TYPE=Release` (Debug builds are the default
284 Add `-DWITH_JPEG7=1` to the CMake command line to build a version of
285 libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add `-DWITH_JPEG8=1`
286 to the CMake command line to build a version of libjpeg-turbo that is
287 API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
291 ### In-Memory Source/Destination Managers
293 When using libjpeg v6b or v7 API/ABI emulation, add `-DWITH_MEM_SRCDST=0` to
294 the CMake command line to build a version of libjpeg-turbo that lacks the
303 included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
307 add `-DWITH_ARITH_ENC=0` or `-DWITH_ARITH_DEC=0` to the CMake command line to
313 Add `-DWITH_JAVA=1` to the CMake command line to incorporate an optional Java
315 Java front-end classes to support it. This allows the TurboJPEG shared library
320 build/test libjpeg-turbo, then (prior to running CMake) set the `JAVA_HOME`
323 CMake variables can also be used to specify alternate commands or locations for
325 `CMAKE_JAVA_COMPILE_FLAGS` CMake variable or the `JAVAFLAGS` environment
327 building the TurboJPEG classes, and the `JAVAARGS` CMake variable to specify
333 -------------
336 ### 32-bit Build on 64-bit Linux/Unix/Mac
339 CMake:
341 CFLAGS=-m32
342 LDFLAGS=-m32
345 ### 64-bit Build on Solaris
348 CMake:
350 CFLAGS=-m64
351 LDFLAGS=-m64
356 On Un*x systems, prior to running CMake, you can set the `CC` environment
360 ### 32-bit MinGW Build on Un*x (including Mac and Cygwin)
362 Create a file called **toolchain.cmake** under *{build_directory}*, with the
367 set(CMAKE_C_COMPILER {mingw_binary_path}/i686-w64-mingw32-gcc)
368 set(CMAKE_RC_COMPILER {mingw_binary_path}/i686-w64-mingw32-windres)
374 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
375 [additional CMake flags] {source_directory}
379 ### 64-bit MinGW Build on Un*x (including Mac and Cygwin)
381 Create a file called **toolchain.cmake** under *{build_directory}*, with the
386 set(CMAKE_C_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-gcc)
387 set(CMAKE_RC_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-windres)
393 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
394 [additional CMake flags] {source_directory}
398 Building libjpeg-turbo for iOS
399 ------------------------------
403 advantage of libjpeg-turbo's SIMD extensions to significantly accelerate JPEG
404 compression/decompression. This section describes how to build libjpeg-turbo
410 - For configurations that require [gas-preprocessor.pl]
411 (https://raw.githubusercontent.com/libjpeg-turbo/gas-preprocessor/master/gas-preprocessor.pl),
415 ### ARMv7 (32-bit)
417 **gas-preprocessor.pl required**
419 The following scripts demonstrate how to build libjpeg-turbo to run on the
420 iPhone 3GS-4S/iPad 1st-3rd Generation and newer:
422 #### Xcode 4.2 and earlier (LLVM-GCC)
426 …export CFLAGS="-mfloat-abi=softfp -march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -miphon…
430 cat <<EOF >toolchain.cmake
433 set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
436 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
437 -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
438 [additional CMake flags] {source_directory}
441 #### Xcode 4.3-4.6 (LLVM-GCC)
451 export CFLAGS="-mfloat-abi=softfp -arch armv7 -miphoneos-version-min=3.0"
452 export ASMFLAGS="-no-integrated-as"
456 cat <<EOF >toolchain.cmake
462 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
463 -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
464 [additional CMake flags] {source_directory}
468 ### ARMv7s (32-bit)
470 **gas-preprocessor.pl required**
472 The following scripts demonstrate how to build libjpeg-turbo to run on the
475 #### Xcode 4.5-4.6 (LLVM-GCC)
479 …export CFLAGS="-Wall -mfloat-abi=softfp -march=armv7s -mcpu=swift -mtune=swift -mfpu=neon -miphone…
483 cat <<EOF >toolchain.cmake
486 set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
489 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
490 -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
491 [additional CMake flags] {source_directory}
499 export CFLAGS="-Wall -mfloat-abi=softfp -arch armv7s -miphoneos-version-min=6.0"
502 ### ARMv8 (64-bit)
504 **gas-preprocessor.pl required if using Xcode < 6**
506 The following script demonstrates how to build libjpeg-turbo to run on the
511 export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=7.0 -funwind-tables"
515 cat <<EOF >toolchain.cmake
521 cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
522 -DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
523 [additional CMake flags] {source_directory}
530 Building libjpeg-turbo for Android
531 ----------------------------------
533 Building libjpeg-turbo for Android platforms requires v13b or later of the
537 ### ARMv7 (32-bit)
543 NDK_PATH={full path to the NDK directory-- for example,
544 /opt/android/android-ndk-r16b}
545 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r16b and earlier,
547 ANDROID_VERSION={the minimum version of Android to support-- for example,
551 cmake -G"Unix Makefiles" \
552 -DANDROID_ABI=armeabi-v7a \
553 -DANDROID_ARM_MODE=arm \
554 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
555 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
556 -DCMAKE_ASM_FLAGS="--target=arm-linux-androideabi${ANDROID_VERSION}" \
557 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
558 [additional CMake flags] {source_directory}
562 ### ARMv8 (64-bit)
568 NDK_PATH={full path to the NDK directory-- for example,
569 /opt/android/android-ndk-r16b}
570 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
573 is required for a 64-bit build.}
576 cmake -G"Unix Makefiles" \
577 -DANDROID_ABI=arm64-v8a \
578 -DANDROID_ARM_MODE=arm \
579 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
580 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
581 -DCMAKE_ASM_FLAGS="--target=aarch64-linux-android${ANDROID_VERSION}" \
582 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
583 [additional CMake flags] {source_directory}
587 ### x86 (32-bit)
593 NDK_PATH={full path to the NDK directory-- for example,
594 /opt/android/android-ndk-r16b}
595 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
597 ANDROID_VERSION={The minimum version of Android to support-- for example,
601 cmake -G"Unix Makefiles" \
602 -DANDROID_ABI=x86 \
603 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
604 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
605 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
606 [additional CMake flags] {source_directory}
610 ### x86-64 (64-bit)
616 NDK_PATH={full path to the NDK directory-- for example,
617 /opt/android/android-ndk-r16b}
618 TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
621 is required for a 64-bit build.}
624 cmake -G"Unix Makefiles" \
625 -DANDROID_ABI=x86_64 \
626 -DANDROID_PLATFORM=android-${ANDROID_VERSION} \
627 -DANDROID_TOOLCHAIN=${TOOLCHAIN} \
628 -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
629 [additional CMake flags] {source_directory}
633 Advanced CMake Options
634 ----------------------
636 To list and configure other CMake options not specifically mentioned in this
643 cmake-gui {source_directory}
646 text-based interactive version of CMake, and CMake-GUI is a GUI version. Both
647 will display all variables that are relevant to the libjpeg-turbo build, their
651 Installing libjpeg-turbo
654 You can use the build system to install libjpeg-turbo (as opposed to creating
658 the Visual Studio IDE) will uninstall libjpeg-turbo.
660 The `CMAKE_INSTALL_PREFIX` CMake variable can be modified in order to install
661 libjpeg-turbo into a directory of your choosing. If you don't specify
664 **c:\libjpeg-turbo**<br>
665 Visual Studio 32-bit build
667 **c:\libjpeg-turbo64**<br>
668 Visual Studio 64-bit build
670 **c:\libjpeg-turbo-gcc**<br>
671 MinGW 32-bit build
673 **c:\libjpeg-turbo-gcc64**<br>
674 MinGW 64-bit build
676 **/opt/libjpeg-turbo**<br>
679 The default value of `CMAKE_INSTALL_PREFIX` causes the libjpeg-turbo files to
681 libjpeg-turbo binary packages. Changing the value of `CMAKE_INSTALL_PREFIX`
682 (for instance, to **/usr/local**) causes the libjpeg-turbo files to be
687 `CMAKE_INSTALL_LIBDIR`, and `CMAKE_INSTALL_MANDIR` CMake variables allow a
688 finer degree of control over where specific files in the libjpeg-turbo
692 documentation to be installed in **${CMAKE\_INSTALL\_PREFIX}/doc**.) If a
696 **\<CMAKE\_INSTALL\_DATAROOTDIR\>/man**.
699 CMake command line, you must specify that the variable is of type `PATH`.
702 cmake -G"{generator type}" -DCMAKE_INSTALL_LIBDIR:PATH=lib {source_directory}
704 Otherwise, CMake will assume that the path is relative to the build directory
716 -----
720 Create Red Hat-style binary RPM package. Requires RPM v4 or later.
725 Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
729 Create Debian-style binary package. Requires dpkg.
733 ---
745 This creates a Mac package/disk image that contains universal x86-64/i386/ARM
746 binaries. The following CMake variables control which architectures are
750 * `OSX_32BIT_BUILD`: Directory containing an i386 (32-bit) Mac build of
751 libjpeg-turbo (default: *{source_directory}*/osxx86)
752 * `IOS_ARMV7_BUILD`: Directory containing an ARMv7 (32-bit) iOS build of
753 libjpeg-turbo (default: *{source_directory}*/iosarmv7)
754 * `IOS_ARMV7S_BUILD`: Directory containing an ARMv7s (32-bit) iOS build of
755 libjpeg-turbo (default: *{source_directory}*/iosarmv7s)
756 * `IOS_ARMV8_BUILD`: Directory containing an ARMv8 (64-bit) iOS build of
757 libjpeg-turbo (default: *{source_directory}*/iosarmv8)
759 You should first use CMake to configure i386, ARMv7, ARMv7s, and/or ARMv8
760 sub-builds of libjpeg-turbo (see "Build Recipes" and "Building libjpeg-turbo
762 aforementioned CMake variables. Next, configure the primary build of
763 libjpeg-turbo as an out-of-tree build, and build it. Once the primary build
765 will build the sub-builds, use lipo to combine them into a single set of
771 ------
779 -------
793 The installer package (libjpeg-turbo-*{version}*[-gcc|-vc][64].exe) will be
807 The most common way to test libjpeg-turbo is by invoking `make test` (Un*x) or
811 libjpeg-turbo and libjpeg v6b. This also invokes the TurboJPEG unit tests,