Kdevelop project?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
mr_smith
Gnoblar
Posts: 17
Joined: Sun Feb 27, 2005 12:13 am
Location: Australia

Kdevelop project?

Post by mr_smith » Fri Mar 11, 2005 12:42 pm

Ive been trying to make a kdevelop project for Ogre am having no success. Has anyone? It doesn't seem as simple as anjuta, where its just typing in a few paths here and there. A howto for making an SDL project invloves changing some autotools thingyg (configure.in). so i added the important looking bits from the example configure.ac file in the humble beginings wiki file but when I ./configure it then complains about no OGRE:

Code: Select all

checking for pkg-config... /usr/bin/pkg-config
checking for OGRE >= 1.0.0... Package OGRE was not found in the pkg-config search path.
Perhaps you should add the directory containing `OGRE.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OGRE' found
configure: error: "OGRE not found!"
Also i looked at my environment variables and PKG_CONFIG_PATH isnt there.

This is what my configure.in looks like:

Code: Select all

AC_INIT(configure.in)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(testing, 0.1)

AC_LANG_CPLUSPLUS
AC_PROG_CXX
AM_PROG_LIBTOOL

PKG_CHECK_MODULES(OGRE, OGRE >= 1.0.0,,AC_MSG_ERROR("OGRE not found!"))
AM_CXXFLAGS="$AM_CXXFLAGS $OGRE_CFLAGS"
AM_LDFLAGS="$AM_LDFLAGS $OGRE_LIBS"

AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS")
AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS")
AC_SUBST(PKGDATADIR, "${datadir}/${PACKAGE}")$OGRE_LIBS

AC_OUTPUT(Makefile src/Makefile)
Kdevelop is really weird, it keeps changing behind my back, last time i remember it was easier o do this kind of stuff than anjuta. And I should really learn about this autostuff.
0 x

mr_smith
Gnoblar
Posts: 17
Joined: Sun Feb 27, 2005 12:13 am
Location: Australia

Post by mr_smith » Fri Mar 11, 2005 1:05 pm

if I make my configure.in flie this:

Code: Select all

AC_INIT(configure.in)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(testing, 0.1)

AC_LANG_CPLUSPLUS
AC_PROG_CXX
AM_PROG_LIBTOOL

AC_CHECK_LIB(OgreMain, 
       main, 
       LIBS="$LIBS -lOgreMain", 
       AC_MSG_ERROR([*** OGRE library not found!]) 
)
CXXFLAGS="$CXXFLAGS $OGRE_CFLAGS" 
LIBS="$LIBS $OGRE_LIBS"

AC_OUTPUT(Makefile src/Makefile)
if ./configures but I duuno what to do next. It still complains about headers.
I also noted that the example anjuta project doesn't say anything about OGRE in any of the files it produces.
0 x

loloh
Gnoblar
Posts: 5
Joined: Tue Dec 14, 2004 11:53 am

Re: Kdevelop project?

Post by loloh » Fri Mar 11, 2005 7:13 pm

pkgconfig is looking for 'OGRE.pc'.

This file is in 'ogrenew' and installed to 'PREFIX/lib/pkgconfig/' (/usr/local/lib/pkgconfig/ by default).

Set PKG_CONFIG_PATH to this dir and run 'configure'.

Code: Select all

$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure
You should consider to put it on your ~/.bashrc. In my system it's set to:

Code: Select all

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig
0 x

mr_smith
Gnoblar
Posts: 17
Joined: Sun Feb 27, 2005 12:13 am
Location: Australia

Post by mr_smith » Sat Mar 12, 2005 3:42 am

hurray, it now works fine after setting the PKG_CONFIG_PATH variable in the Project/Project Options/Configure Option/Environment Variables box to the correct value. It doent seem to work if i set it outside kdevelop like in .bashrc
0 x

loloh
Gnoblar
Posts: 5
Joined: Tue Dec 14, 2004 11:53 am

Post by loloh » Tue Mar 15, 2005 12:53 am

mr_smith wrote:It doent seem to work if i set it outside kdevelop like in .bashrc
Dunno if kdevelop is ignoring the environment, try inserting a 'export' in front of the .bashrc variable and restart KDE, or launch kdevelop from a new terminal.
0 x

Post Reply