discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using cmakelists.txt rather than gnumakefile


From: bruce
Subject: Re: Using cmakelists.txt rather than gnumakefile
Date: Mon, 3 Jul 2023 07:53:20 -0700

Thanks for verifying my suspicion that there is no specific support for gnustep in cmake. So, after adding a slew of custom commands, I'm finally getting somewhere. The biggest stumbling block was getting debug to work. Apparently the executable ./build/AppName is unable to locate it's bundle unless I push it all down into ./build/AppName.app/AppName, and then it works. I didn't realize it was so rigidly attached to that folder name... Is that documented anywhere? a rhetorical question - I don't find much documentation at all. The only other thing that's got me stumped now, is why the cmake built executable  is over twice the size of the gmake built executable. Mystery upon mystery, all the way down :) 

On Sun, Jul 2, 2023 at 12:04 PM Gregory Casamento <greg.casamento@gmail.com> wrote:
Hey Bruce,

On Sun, Jul 2, 2023 at 10:46 bruce <darkoverlordofdata@gmail.com> wrote:

I’d like to use cmake rather than gmake to build my gnustep projects, due to my ide having good tooling for cmake, and none at all for gmake.


I can successfully build my executable this way, but not the appdir bundle. So I have to create it manually, or with a custom shell script. I would like to have it created automatically, the way gmake does.


So far, I’ve tried using add_executable(... MACOSX_BUNDLE …), and it does nothing.

I’ve tried several ways with add_custom_command, but this either dumps all my resources into the top level of the build folder, or copies an empty Resources folder. And I’m stuck on generating the AppName.app folder.


 Is it even possible to do? Or am I wasting my time? Does anyone have a template for this? When I try to google it, the only results I find are for building gnustep itself, not gnustep projects.


No. You’re not wasting your time.  It is certainly possible.  I am currently working for a company that uses GNUstep in production (Keysight, our eggplant product uses it).  The build is done using cmake so that we are able to abstract the build process between platforms (macOS, windows, Linux).  

Using cmake is certainly doable.  You will need to write a set of cmake scripts to properly build the app bundles and package things as gnustep expects them. 

At present no one has released anything to do this for gnustep.  Though I would certainly welcome it as a contribution.

The scripts we developed here at my job are too specific for the app to useful in the general case but they do illustrate that it is possible. 

Thanks

No worries. 

--

Bruce Davidson

--
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
https://www.patreon.com/bePatron?u=352392 - Become a Patron


--

Bruce Davidson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]