Compiling CEGUI on Linux Using setup.py

dermont

25-10-2005 18:34:08

@fog,

How do I add the linker option -lCEGUITaharezLook directly to setup.py?.

Using the current setup.py and adding ext_cegui compiles OK but I still run into the same error regarding CEGUITaharezLook.so as we discussed on the main forum:

[url=http://www.ogre3d.org/phpBB2/viewtopic]http://www.ogre3d.org/phpBB2/viewtopic. ... &start=100


I've tried manually compiling the cegui stuff but encountered some strange problems running from dir's other than Ogre's bin(?).

Currently as a hack I've create a dummy CEGUI-OGRE-PYTHON.pc package config file with -lCEGUITaharezLook and updated setup.py as follows:

..
pkg_config_module='CEGUI CEGUI-OPENGL CEGUI-OGRE CEGUI-OGRE-PYTHON',
..


This works fine and resolves my problem. However I've been asked to submit this as a patch so any help would be appreciated on how to do this properly.

fog

26-10-2005 01:00:16

Unfortunately untill I understand why we need the direct link this is the proper way. Just submit the .pc file and I'll make sure pkf-config finds it in the pyogre directory.

dermont

26-10-2005 07:58:32

Thanks, I've submitted th .pc file.

fog

26-10-2005 11:05:25

I had to do some lesser modifications to both the .pc file and to setup.py to read the value of "prefix" from CEGUI.pc and generate a CEGUI-OGRE-PYTHON.pc file with the right value in it. Everything seems to work now (I commited the changes to SVN 10 minutes ago.)

dermont

26-10-2005 13:47:50

Thanks fog nice work.

I had a minor problem with the "CEGUI not found in the pkg-config search path". The os.environ['PKG_CONFIG_PATH'] = os.getcwd() appears to set the package config path to my pyogre dir which meant the OGRE, CEGUI package config stuff wasn't being picked up.

Changing as follows problem gone.

#os.environ['PKG_CONFIG_PATH'] = os.getcwd()
os.environ['PKG_CONFIG_PATH'] = os.environ['PKG_CONFIG_PATH'] +":" + os.getcwd()

fog

27-10-2005 17:34:25

Done. Thak you for the fix (having OGRE.pc in /usr/lib/pkg-config) I didn't noticed that.