mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.34k stars 3.65k forks source link

why when i try build the qgroundcontrol i getted error i try build qgroundcontrol daily and i tried build the 4.4.2 but there are error why give me the steps to building 4.4.2 and what i need do to solve this error here are error qgroundcontrol-4.4.2\src\Joystick\CMakeLists.txt:32: error: By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SDL2", but CMake did not find one. Could not find a package configuration file provided by "SDL2" with any of the following names: SDL2Config.cmake sdl2-config.cmake Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set "SDL2_DIR" to a directory containing one of the above files. If "SDL2" provides a separate development package or SDK, be sure it has been installed. #12115

Open abualiali opened 5 days ago

abualiali commented 5 days ago

Please only ask questions related to source code.

Argyraspides commented 3 days ago

Sounds like you might not have SDL2 on your system, or CMake is looking in the wrong folder for SDL2's own .cmake files. What operating system are you on? There are find_package() CMake commands which attempt to find SDL2 on your system automatically but if you don't have it installed in the default directories CMake tries to look in, or just don't have it at all, this is one of the errors it might throw.

I am going to guess you have some sort of folder misconfiguration. If CMake flat out couldn't find SDL2 it would just say so but in your case it can't find specific cmake config files. In that case do what the error message says and just change CMAKE_PREFIX_PATH to point to wherever the installation prefix of SDL2 is on your system. If you're building with CMake you can just pass in this flag:

-DCMAKE_PREFIX_PATH=/path/to/SDL2 ...

If you don't have SDL2 installed and you're on Ubuntu, you can just run the following on your command line:

sudo apt update
sudo apt-get install libsdl2-dev

Then try building again with CMake (I'm assuming this is what you used). Make sure to build from scratch by removing the build/ folder in the root directory.

abualiali commented 1 day ago

thank you i continue this problem