Skip to content
  • Uli Schlachter's avatar
    Better error messages when libopenjpeg2 is not found · fcdff7bb
    Uli Schlachter authored
    
    
    When I run "cmake -DENABLE_DCTDECODER=none -DENABLE_BOOST=OFF" on my
    system, I get the following output:
    
        -- Found Iconv: /usr/lib/x86_64-linux-gnu/libc.so
        CMake Warning at CMakeLists.txt:252 (find_package):
          By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
          asked CMake to find a package configuration file provided by "OpenJPEG",
          but CMake did not find one.
    
          Could not find a package configuration file provided by "OpenJPEG" with any
          of the following names:
    
            OpenJPEGConfig.cmake
            openjpeg-config.cmake
    
          Add the installation prefix of "OpenJPEG" to CMAKE_PREFIX_PATH or set
          "OpenJPEG_DIR" to a directory containing one of the above files.  If
          "OpenJPEG" provides a separate development package or SDK, be sure it has
          been installed.
    
        CMake Error at CMakeLists.txt:255 (message):
          Install libopenjpeg2 before trying to build poppler.  You can also decide
          to use the internal unmaintained JPX decoder or none at all.
    
        -- Configuring incomplete, errors occurred!
        See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
        See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".
    
    To figure out what exactly to do now, I have to read some
    CMakeLists.txt. This commit improves the situation by producing the
    following output instead:
    
        -- Found Iconv: /usr/lib/x86_64-linux-gnu/libc.so
        CMake Warning at CMakeLists.txt:254 (find_package):
          By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
          asked CMake to find a package configuration file provided by "OpenJPEG",
          but CMake did not find one.
    
          Could not find a package configuration file provided by "OpenJPEG" with any
          of the following names:
    
            OpenJPEGConfig.cmake
            openjpeg-config.cmake
    
          Add the installation prefix of "OpenJPEG" to CMAKE_PREFIX_PATH or set
          "OpenJPEG_DIR" to a directory containing one of the above files.  If
          "OpenJPEG" provides a separate development package or SDK, be sure it has
          been installed.
    
        -- Could NOT find openjpeg2.
        CMake Error at CMakeLists.txt:258 (message):
          Install libopenjpeg2 before trying to build poppler.  You can also decide
          to use the internal unmaintained JPX decoder or none at all.
    
          Possible options are: -DENABLE_LIBOPENJPEG=openjpeg2,
          -DENABLE_LIBOPENJPEG=none, -DENABLE_LIBOPENJPEG=unmaintained,
    
        -- Configuring incomplete, errors occurred!
        See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
        See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".
    
    Signed-off-by: default avatarUli Schlachter <psychon@znc.in>
    fcdff7bb