CMake build for libPlasma

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

CMake build for libPlasma

Postby Branan » Mon Feb 15, 2010 4:18 pm

EDIT: From now on, the latest versions of the files will be kept in the feature request: http://code.google.com/p/libhsplasma/issues/detail?id=8

I've created a CMake buildsystem for libPlasma and the tools. CMake is a meta-buildsystem that can create Makefiles, XCode projects, Visual Studio projects, and a number of other buildsystems. Using it means you only have to edit source lists and such in one place and all the platform-specific builds "just work".

I've tested it on windows using mingw (already a platform not supported with the old build method!), and on 64-bit Linux. It seems to work - everything builds and links. 'make install' is all set. Source grouping in visual studio is possible (and the sources are already 'grouped' into different variables in the CMake file), but I haven't implemented it yet.

The CMake files for libPlasma are at http://stashbox.org/803314/PlasmaCmake.zip

The CMake files for PlasmaShop are at http://stashbox.org/798116/PlasmaShopCmake.zip

EDIT: Remembered Stashbox, and added a few more details about what's implemented
EDIT2: Update with header file installation and CMake files for PlasmaShop &co
EDIT3: Updated for libPlasma r370
Last edited by Branan on Fri Mar 05, 2010 9:13 pm, edited 4 times in total.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: CMake build for libPlasma

Postby Branan » Tue Feb 16, 2010 6:14 pm

I've updated the libPlasma CMake, making it an archive with the CMake files and a separate patch, rather than a monolithic patch file. I've also added CMake support to PlasmaShop, PrpShop, and VaultShop. That link is in my original post.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: CMake build for libPlasma

Postby Zrax » Wed Feb 17, 2010 9:47 am

Thanks Paladin, I'll take a look at your CMake build system sometime soon... It does look like a better system than what I have now :). However, for PlasmaShop, I would prefer to keep the current qmake system, since it's more specifically targetted for Qt projects (and already works well with the current build setup)... Unless there's some other reason you wanted CMake for PlasmaShop >.>
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: CMake build for libPlasma

Postby Branan » Wed Feb 17, 2010 10:41 am

My CMake build can find either an installed libPlasma or build it as a subdirectory of the PlasmaShop tree (the same technique I use for zlib and jpeg in libPlasma), eliminating the need to make sure the two trees are side-by-side. Other than that, there's not really any feature benefit that I can think of.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: CMake build for libPlasma

Postby diafero » Sun Feb 21, 2010 5:12 am

I don't know whether the new build system Zrax committed for libPlasma is CMake-based (it does not seem to be), but it works fine - thanks :)
However, PlasmaShop also needs to be updated since the libraries are now in lib instead of bin. I attached a patch which makes it compile. No, I don't know why the patch shows these two additional lines in the pro file to differ, might be a line-end issue.

Even with this patch, a weird problem I am encountering for quite a while now persists: After doing a complete cleanup of the source dir and re-building everything ("git reset --hard HEAD && git clean -xfd && qmake && make -j3"), the bin directory contains only the qscintilla library, not the three binaries. The reason is that obviously some dependencies are not set correctly, I see this error message in the compile output:
/usr/bin/ld: cannot find -lqscintilla2-ps3
collect2: ld returned 1 exit status
qscintilla is built AFTER PrpShop, PlasmaShop and VaultShop! Running "make" again after the first one is done finishes everything properly.
Attachments
0001-update-Makefiles-for-new-libPlasma-build-system.patch.zip
(1 KiB) Downloaded 324 times
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: CMake build for libPlasma

Postby Branan » Sun Feb 21, 2010 11:31 am

Just FYI, my CMake build system for libPlasma needs to be updated now, if there's any interest in using it. There was a class added (can't remember it now off the top of my head)

I'll upload a new version of the zip today sometime when I can get to my computer.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: CMake build for libPlasma

Postby Zrax » Sun Feb 21, 2010 7:48 pm

I think I'll be keeping the current build system for now, at least until I have more time to look at CMake... And yes, I do plan on making a configure script for PlasmaShop as well (including a --with-plasma=/path/to/libPlasma option), but I've been a bit busy with certain other priorities lately ;)
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: CMake build for libPlasma

Postby Branan » Mon Feb 22, 2010 2:27 pm

Zrax wrote:I think I'll be keeping the current build system for now, at least until I have more time to look at CMake... And yes, I do plan on making a configure script for PlasmaShop as well (including a --with-plasma=/path/to/libPlasma option), but I've been a bit busy with certain other priorities lately ;)


There's no rush, of course :). I'll keep maintaining the CMake build until you get around to looking at it.

Speaking of: PlasmaCmake.zip now updated for SVN370. No more patch needed :)
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: CMake build for libPlasma

Postby Branan » Fri Mar 05, 2010 9:16 pm

  1. From now on, the CMake files will be available at the feature request http://code.google.com/p/libhsplasma/issues/detail?id=8
  2. PyHSPlasma support has been added
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR


Return to Plasma Development

Who is online

Users browsing this forum: Google [Bot] and 8 guests