Qt5config

↑Qt 5.5.0 problem running examples SOLVED. Archived from the original on 2016-08-01. Retrieved 2016-08-01. Execute the following command to install OpenGL libraries: sudo apt-get install mesa-common-dev Note: Just installing the above-mentioned mesa-common-dev kit is not sufficient for more recent Ubuntu versions. Qt5GuiConfig.cmake qt5gui-config.cmake' I know the correct path to this things, but I do not know how to tell it Cmake. Also with google I found no solution. This is the normal command I use: cmake -D WITHTBB=ON -D BUILDNEWPYTHONSUPPORT=ON -D WITHV4L=ON -D INSTALLCEXAMPLES=ON -D BUILDEXAMPLES=ON -D WITHQT=ON -D WITHOPENGL=ON.

SDL2 is the newest version of the Simple Directmedia Layer API. It can be usedtogether with CMake to build a cross platform multimedia application. In thisblog post I will describe the necessary steps to use SDL2 with CMake on bothLinux (Ubuntu 17.04) and Windows.

You need to create a CMakeLists.txt file for your project that includes SDL2and compiles a simple program.

You can use the following code:

Linux

Setting up SDL2 with CMake under Ubuntu Linux is pretty easy. All you need to dois install the required dependencies first.

Now you can use cmake to generate your Makefiles and build your project. Toinclude SDL2 headers you just use #include 'SDL.h'. The correct include pathshave been set up by cmake. For Linux nothing else is required.

Windows

For Windows you have to download the development packageSDL2-devel-2.0.5-VC.zip and extract it to some location on your hard disk.

You can create Visual Studio project files with the CMake GUI under windows butwhen you hit configure it will fail because it will not find the SDL2 Library.

Qt5config

In the configuration window you will see a SDL2_DIR variable. You will have topoint that to the location where you extracted the SDL2 development package.

Before you can reconfigure you also have to create a file sdl2-config.cmakewhere you extracted the development libraries and put the following content:

After that you now should be able to reconfigure successfully and generate theVisual Studio project files.

Alternative

An alternative to the config file is a FindSDL2.cmake module.CMake comes with one that works for SDL1.2, it can be adapted to work with SDL2.Here is the full content for the one that I am using:

In order to use it you have to place it somewhere in your project for instance into a cmake subdirectory.Then you have to modify the CMake module path so that it can be found.

Test App

You can create a test application to verify that everything works. You could forinstance use the following code for that which renders a black window.

If you also want to use SDL2_image check out my other post Using SDL2_image with CMake.

There is also a complete project in my github repository here.

gvdhoorn
745372001064905 http://cor.tudelft.nl/

when i creating a new workspace(in windouws) using

this error happend.

i dont know why,and dont konw how to fix it.Does someone konw how to fix it? Iwould be appreciated!

editretagflag offensiveclosemergedelete

Comments

I have the same issue. Did you install from binaries? Which ROS2 version and patch release are you using?

Mac

By the way, I think this is a duplicate to this question.

Qt5config.cmake macQt5config

yes,i install from binaries,foxy.And,the patch release maybe patch release 4? I forget it.

@Ataraxy I just fixed the issue. Check this question for my solution. Image grid instagram template.

Qt5config.cmake Mac

Thx man !! i fixed it.its useful,thx a lot!!