Search code examples
ccmakelibjpeglibjpeg-turbo

Building libjepeg-turbo from source doesn't build the library libturbojpeg.so*


I'm trying to build libjpeg-turbo from source to include 12 bit support. I downloaded the source code from here (2.0.1) then followed instruction given in Building.md

    cd libjpeg-turbo-2.0.1 
    mkdir build && cd build
    cmake -G"Unix Makefiles" -D WITH_12BIT=1 -D WITH_TURBOJPEG=1 ..
    make -j8
    sudo make install

The compilation is successful and generates only libjpeg.so, libjpeg.so.62 and libjpeg.so.62.3.0 along with bunch of other binary files. But its not building the lib files libturbojpeg.so.0.2.0, libturbojpeg.a and libturbojpeg.so which i need. I'm not sure where I am going wrong. i have also tried without the -D WITH_TURBOJPEG flag.

I'm trying this on Ubuntu 16.04 on Nvidia Tx2.

Any help is greatly appreciated.

Thanks


Solution

  • Line 201 of CMakeLists.txt turns WITH_TURBOJPEG off when building with WITH_12BIT enabled.

    Don't enable WITH_12BIT and then WITH_TURBOJPEG will be default enabled and should build those libraries.