Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2、Libdrm_LIBRARY #50

Open
Lennox7746 opened this issue Jun 26, 2024 · 6 comments
Open

SDL2、Libdrm_LIBRARY #50

Lennox7746 opened this issue Jun 26, 2024 · 6 comments

Comments

@Lennox7746
Copy link

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.
@kisvegabor
Copy link
Member

Hi,

I have 2 questions:

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

@badevos
Copy link

badevos commented Jul 5, 2024

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

@YobeZhou
Copy link
Contributor

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$

@jiangliu123456
Copy link

ubuntu 16.04

用下面两行替换find_package(SDL2_image)
find_library(NAME SDL2_image REQUIRED)
link_libraries(SDL2_image)

@kisvegabor
Copy link
Member

It should be fixed in LVGL v9.2.

@debug-richard
Copy link
Contributor

#60 fixed the library detection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants