[Solved] How to make a cmake-file for SDL2_gfx

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[Solved] How to make a cmake-file for SDL2_gfx

Postby hansmicheelsen » Mar 13th, '24, 03:17

I am currently looking into using lib64sdl2_gfx for a project where I use CMake. The problem now is the sdl2_gfx-devel does not contain a sdl2_gfx-config.cmake ot be used by find_package(). The issue has been adressed in https://bugs.mageia.org/show_bug.cgi?id=32960
I have contacted the maintainer of sdl2_gfx who would love to include the file needed if can tell him how to construct sdl2_gfx-config.cmake from his Makefile. I have found instructions on how to do it from a CMake-project. But sdl2_gfx is not a CMake project. It is a Makefile project.
Do anyone here know how to do?
Last edited by hansmicheelsen on Mar 16th, '24, 20:50, edited 1 time in total.
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19

Re: How to make a cmake-file for SDL2_gfx

Postby doktor5000 » Mar 13th, '24, 21:03

Well you're basically asking for advice how to migrate a project using old autoconf to Cmake (please keep in mind that Cmake is also only a means to create a Makefile which can be processed by automake).
Although I'd say this is not required at all, you can simply rely on pkg-config which can be called from your Cmake project
See e.g. https://stackoverflow.com/questions/291 ... from-cmake and https://cmake.org/cmake/help/latest/mod ... onfig.html

Apart from that there's https://cmake.org/cmake/help/book/maste ... s-to-cmake
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] How to make a cmake-file for SDL2_gfx

Postby hansmicheelsen » Mar 16th, '24, 12:55

Thank you Doktor5000. That will certainly help me further. Maybe I should offer to port gfx to CMake.
I'll make as solved.
hansmicheelsen
 
Posts: 55
Joined: Apr 12th, '13, 18:19

Re: How to make a cmake-file for SDL2_gfx

Postby doktor5000 » Mar 16th, '24, 15:59

Please don't forget to mark the thread as solved, by editing the subject of the first post and prefix it with [SOLVED], thanks in advance.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron