lvgl/lv_port_linux

SDL2、Libdrm_LIBRARY

Lennox7746 opened this issue · 5 comments

I have encountered some issues. I want to use hdmi to display lvgl images on my Linux development board, but when trying to create a cmake file, I keep getting the following error message. May I ask what SDL2 and Libdrm.LIBRARY are?

The error is as follows

zyc@zyc-desktop-ubuntu22:~/code/lvgl_v9_linux/build$ cmake ..
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for modules 'pkg_check_modules;libdrm'
--   No package 'pkg_check_modules' found
-- Could NOT find Libdrm (missing: Libdrm_LIBRARY) 
CMake Warning at CMakeLists.txt:26 (find_package):
  By not providing "FindSDL2_image.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "SDL2_image", but CMake did not find one.

  Could not find a package configuration file provided by "SDL2_image" with
  any of the following names:

    SDL2_imageConfig.cmake
    sdl2_image-config.cmake

  Add the installation prefix of "SDL2_image" to CMAKE_PREFIX_PATH or set
  "SDL2_image_DIR" to a directory containing one of the above files.  If
  "SDL2_image" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Libdrm_LIBRARY (ADVANCED)
    linked by target "main" in directory /home/zyc/code/lvgl_v9_linux

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Hi,

I have 2 questions:

  • Which display driver have you selected? See here.
  • Which display driver would you like to use?

I had the same issue, yet this seems to be fixed using the following:
https://stackoverflow.com/questions/52813560/i-have-libsdl2-image-dev-installed-via-apt-get-but-cmake-cannot-find-it

I'm working on Ubuntu 22.04

I'm ok on Ubuntu 18.04:

ubuntu@ubuntu1804:~/work/lv_port_linux/build$ sudo apt-get install libsdl2-2.0 libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev -y
ubuntu@ubuntu1804:~/work/lv_port_linux/build$ cmake -version
cmake version 3.30.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
ubuntu@ubuntu1804:~/work/lv_port_linux/build$